Skip to content

Commit d03851f

Browse files
committed
style(optional): apply ruff against latest
1 parent 46dfdf0 commit d03851f

1 file changed

Lines changed: 2 additions & 18 deletions

File tree

code/planet/feedparser.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2765,16 +2765,7 @@ def _parse_date_greek(dateString):
27652765
month = _greek_months[m.group(3)]
27662766
except:
27672767
return None
2768-
rfc822date = "{wday}, {day} {month} {year} {hour}:{minute}:{second} {zonediff}".format(
2769-
wday=wday,
2770-
day=m.group(2),
2771-
month=month,
2772-
year=m.group(4),
2773-
hour=m.group(5),
2774-
minute=m.group(6),
2775-
second=m.group(7),
2776-
zonediff=m.group(8),
2777-
)
2768+
rfc822date = f"{wday}, {m.group(2)} {month} {m.group(4)} {m.group(5)}:{m.group(6)}:{m.group(7)} {m.group(8)}"
27782769
if _debug:
27792770
sys.stderr.write("Greek date parsed as: %s\n" % rfc822date)
27802771
return _parse_date_rfc822(rfc822date)
@@ -2816,14 +2807,7 @@ def _parse_date_hungarian(dateString):
28162807
hour = "0" + hour
28172808
except:
28182809
return None
2819-
w3dtfdate = "{year}-{month}-{day}T{hour}:{minute}{zonediff}".format(
2820-
year=m.group(1),
2821-
month=month,
2822-
day=day,
2823-
hour=hour,
2824-
minute=m.group(5),
2825-
zonediff=m.group(6),
2826-
)
2810+
w3dtfdate = f"{m.group(1)}-{month}-{day}T{hour}:{m.group(5)}{m.group(6)}"
28272811
if _debug:
28282812
sys.stderr.write("Hungarian date parsed as: %s\n" % w3dtfdate)
28292813
return _parse_date_w3dtf(w3dtfdate)

0 commit comments

Comments
 (0)