diff --git a/pyproject.toml b/pyproject.toml index 626cd1f41..6fc07cc91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -170,11 +170,6 @@ ignore = [ "D", # flake8-django "DJ", # Django is not used in Sphinx - # flake8-datetimez - "DTZ001", # do not use `datetime.datetime()` without `tzinfo` argument - "DTZ004", # do not use `datetime.datetime.utcfromtimestamp()` - "DTZ005", # do not use `datetime.datetime.now()` without `tz` argument - "DTZ006", # do not use `datetime.datetime.fromtimestamp()` without `tz` argument # flake8-errmsg "EM101", # exception must not use a string literal, assign to variable first "EM102", # exception must not use an f-string literal, assign to variable first diff --git a/tests/test_util_i18n.py b/tests/test_util_i18n.py index d13b70c58..9a1ecc55f 100644 --- a/tests/test_util_i18n.py +++ b/tests/test_util_i18n.py @@ -67,7 +67,7 @@ def test_format_date(): assert i18n.format_date(format, date=date, language='en') == format format = '%B %d, %Y, %H:%M:%S %I %p' - datet = datetime.datetime(2016, 2, 7, 5, 11, 17, 0) + datet = datetime.datetime(2016, 2, 7, 5, 11, 17, 0) # NoQA: DTZ001 assert i18n.format_date(format, date=datet, language='en') == 'February 07, 2016, 05:11:17 05 AM' format = '%B %-d, %Y, %-H:%-M:%-S %-I %p'