{"id":44965,"library":"flake8-datetimez","title":"flake8-datetimez","description":"A flake8 plugin that flags usage of naive datetime objects, enforcing timezone-aware datetime handling. Current version 20.10.0, maintained infrequently (last release 2020).","status":"active","version":"20.10.0","language":"python","source_language":"en","source_url":"https://github.com/pjknkda/flake8-datetimez","tags":["flake8","linting","datetime","timezone"],"install":[{"cmd":"pip install flake8-datetimez","lang":"bash","label":"Install plugin"}],"dependencies":[{"reason":"Required plugin runner","package":"flake8","optional":false}],"imports":[],"quickstart":{"code":"pip install flake8 flake8-datetimez\necho 'dt = datetime.datetime.now()' > test.py\nflake8 test.py","lang":"bash","description":"Install flake8 and the plugin, then run flake8 on a file with naive datetime usage."},"warnings":[{"fix":"Manually review code for other naive datetime patterns, or use additional tools like flake8-datetime-utcnow.","message":"Plugin does not catch all naive datetime patterns: it only flags calls to datetime.datetime() without a tzinfo argument. Calls like datetime.datetime.utcnow() or datetime.datetime.now(pytz.UTC) are not flagged.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure flake8 is installed and configured.","message":"The plugin only works with flake8; it does not work standalone or with other linters.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'20.10.0':22 '2020':27 'awar':17 'current':20 'datetim':12,18,30 'datetimez':3 'enforc':14 'flag':8 'flake8':2,5,28 'flake8-datetimez':1 'handl':19 'infrequ':24 'last':25 'lint':29 'maintain':23 'naiv':11 'object':13 'plugin':6 'releas':26 'timezon':16,31 'timezone-awar':15 'usag':9 'version':21","created_at":"2026-06-07T12:52:42.190131+00:00","updated_at":"2026-06-07T12:52:42.190131+00:00","problems":[{"fix":"Update flake8 and all plugins; ensure files are UTF-8 encoded.","cause":"flake8-datetimez may conflict with other flake8 plugins or parse errors in files with non-standard encoding.","error":"E902 TokenError: ('EOF in multi-line statement', ...) or general syntax errors"},{"fix":"Remove any explicit import of 'flake8_datetimez' modules; simply add the package to the project and run flake8.","cause":"Incorrect import attempt of internal functions. The plugin is auto-discovered by flake8; no explicit import needed.","error":"ImportError: cannot import name 'check_naive_datetime' from 'flake8_datetimez'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/pjknkda/flake8-datetimez","github":"https://github.com/pjknkda/flake8-datetimez","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}