Skip to content

Commit

Permalink
docs(textforecast): Return types
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroWave022 committed Oct 13, 2023
1 parent f469c84 commit 37bfe2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions yr_weather/data/textforecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get(self, location: str) -> Optional[ForecastLocation]:
Returns
-------
Optional[:class:`TextForecastArea`]
Optional[:class:`ForecastLocation`]
The location which has been found, or None if not found.
"""
found_areas = list(filter(lambda loc: loc["name"] == location, self._raw))
Expand Down Expand Up @@ -116,7 +116,12 @@ def __init__(self, data: APITextForecasts, forecast_type: str) -> None:
)

def now(self) -> TextForecastTime:
"""Get the TextForecastTime which applies now"""
"""Get the TextForecastTime which applies now
Returns
-------
Optional[:class:`.TextForecastTime`]
"""
# The times from textforecast seem to be given in Europe/Oslo time
oslo_timezone = pytz.timezone("Europe/Oslo")
now = datetime.now(oslo_timezone)
Expand Down

0 comments on commit 37bfe2d

Please sign in to comment.