Reorder imports
This commit is contained in:
parent
645957288d
commit
d124d0d2ea
1 changed files with 5 additions and 5 deletions
10
web_view.py
10
web_view.py
|
|
@ -14,7 +14,8 @@ import time
|
||||||
import traceback
|
import traceback
|
||||||
import typing
|
import typing
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from datetime import date, datetime, timedelta, timezone
|
from datetime import date
|
||||||
|
from datetime import datetime, timedelta, timezone
|
||||||
from zoneinfo import ZoneInfo
|
from zoneinfo import ZoneInfo
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
|
@ -25,8 +26,8 @@ import yaml
|
||||||
from authlib.integrations.flask_client import OAuth
|
from authlib.integrations.flask_client import OAuth
|
||||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||||
|
|
||||||
import agenda.data
|
|
||||||
import agenda.conference
|
import agenda.conference
|
||||||
|
import agenda.data
|
||||||
import agenda.error_mail
|
import agenda.error_mail
|
||||||
import agenda.fx
|
import agenda.fx
|
||||||
import agenda.holidays
|
import agenda.holidays
|
||||||
|
|
@ -38,7 +39,7 @@ import agenda.trip_schengen
|
||||||
import agenda.uk_school_holiday
|
import agenda.uk_school_holiday
|
||||||
import agenda.utils
|
import agenda.utils
|
||||||
import agenda.weather
|
import agenda.weather
|
||||||
from agenda import ical, calendar, format_list_with_ampersand, travel, uk_tz
|
from agenda import calendar, format_list_with_ampersand, ical, travel, uk_tz
|
||||||
from agenda.event import Event
|
from agenda.event import Event
|
||||||
from agenda.types import StrDict, Trip
|
from agenda.types import StrDict, Trip
|
||||||
|
|
||||||
|
|
@ -854,7 +855,6 @@ def sum_co2_by_transport_type(trips: list[Trip]) -> list[tuple[str, float]]:
|
||||||
|
|
||||||
def get_home_weather() -> list[StrDict]:
|
def get_home_weather() -> list[StrDict]:
|
||||||
"""Get Bristol home weather forecast, with date objects added for templates."""
|
"""Get Bristol home weather forecast, with date objects added for templates."""
|
||||||
from datetime import date as date_type
|
|
||||||
|
|
||||||
forecasts = agenda.weather.get_forecast(
|
forecasts = agenda.weather.get_forecast(
|
||||||
app.config["DATA_DIR"],
|
app.config["DATA_DIR"],
|
||||||
|
|
@ -864,7 +864,7 @@ def get_home_weather() -> list[StrDict]:
|
||||||
cache_only=True,
|
cache_only=True,
|
||||||
)
|
)
|
||||||
for f in forecasts:
|
for f in forecasts:
|
||||||
f["date_obj"] = date_type.fromisoformat(f["date"])
|
f["date_obj"] = date.fromisoformat(f["date"])
|
||||||
return forecasts
|
return forecasts
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue