import astral # type: ignore
from astral.sun import sun # type: ignore
from bs4 import BeautifulSoup # type: ignore
+from overrides import overrides
import pytz
import argparse_utils
cfg.add_argument(
'--weather_forecast_cachefile',
type=str,
- default=f'{os.environ["HOME"]}/.weather_forecast_cache',
+ default=f'{os.environ["HOME"]}/cache/.weather_forecast_cache',
metavar='FILENAME',
help='File in which to cache weather data'
)
)
@classmethod
+ @overrides
def load(cls):
if persistent.was_file_written_within_n_seconds(
config.config['weather_forecast_cachefile'],
return cls(weather_data)
return None
+ @overrides
def save(self):
import pickle
with open(config.config['weather_forecast_cachefile'], 'wb') as wf: