diff --git a/pyproject.toml b/pyproject.toml index 96879ec..659a2d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -162,8 +162,8 @@ select = [ ignore = [ # Allow non-abstract empty methods in abstract base classes "B027", - # Allow use of datetime with tz and date.today - "DTZ005", "DTZ011", + # Allow use of date.today + "DTZ011", # Remove flake8-errmsg since we consider they bloat the code and provide limited value "EM", # Allow boolean positional values in function calls, like `dict.get(... True)` diff --git a/src/kolibri2zim/scraper.py b/src/kolibri2zim/scraper.py index 412bcf4..e812305 100644 --- a/src/kolibri2zim/scraper.py +++ b/src/kolibri2zim/scraper.py @@ -927,7 +927,7 @@ def sanitize_inputs(self): channel_meta = self.db.get_channel_metadata(self.channel_id) # input & metadata sanitation - period = datetime.datetime.now().strftime("%Y-%m") + period = datetime.date.today().strftime("%Y-%m") if self.fname: # make sure we were given a filename and not a path fname_path = Path(str(self.fname).format(period=period))