ruff format
This commit is contained in:
parent
cfd49318cd
commit
b35bbe2d1c
1 changed files with 4 additions and 2 deletions
6
main.py
6
main.py
|
@ -42,7 +42,6 @@ def format_datetime(dt):
|
||||||
return f"{format_date(dt)} {format_time(dt)}"
|
return f"{format_date(dt)} {format_time(dt)}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def pollen_desc(index):
|
def pollen_desc(index):
|
||||||
if index < 2.5:
|
if index < 2.5:
|
||||||
return f"{index} l"
|
return f"{index} l"
|
||||||
|
@ -106,7 +105,10 @@ async def fetch_pollen(zipcode):
|
||||||
datetime.fromisoformat(data["ForecastDate"])
|
datetime.fromisoformat(data["ForecastDate"])
|
||||||
),
|
),
|
||||||
"periods": [
|
"periods": [
|
||||||
{"index": pollen_desc(d["Index"]), "period": relative_day_to_date(d["Type"])}
|
{
|
||||||
|
"index": pollen_desc(d["Index"]),
|
||||||
|
"period": relative_day_to_date(d["Type"]),
|
||||||
|
}
|
||||||
for d in data["Location"]["periods"]
|
for d in data["Location"]["periods"]
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue