Skip to content

Commit

Permalink
appease linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaveas committed Nov 24, 2023
1 parent c21b9a9 commit 6023847
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_closest_forecast(forecasts, event_time):

closest_forecast = forecasts["list"][0]
for forecast in forecasts["list"]:
if forecast["dt"] + 3 * 60 * 60 >= event_unix_timestamp:
if forecast["dt"] + 3 * 60 * 60 >= event_unix_timestamp:
closest_forecast = forecast
break

Expand Down
9 changes: 7 additions & 2 deletions src/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import config

from _calendar import get_calendar_events
from _forecast import get_weather_forecasts, format_weather_message, bad_weather, get_closest_forecast
from _forecast import (
get_weather_forecasts,
format_weather_message,
bad_weather,
get_closest_forecast,
)
from _telegram import send_message_forecast


Expand All @@ -16,7 +21,7 @@ def main():
if len(events) == 0:
print("No events found")
return

forecasts = get_weather_forecasts(config.LAT, config.LON)
closest_forecast = get_closest_forecast(forecasts, events[0]["start"])

Expand Down

0 comments on commit 6023847

Please sign in to comment.