Open yakMM opened 1 year ago
+1 on this. In Python 3.12 neither venv nor virtualenv will install setuptools by default into environments. As a result, this will start to fail pretty soon.
For anyone else who's hit this with pre-commit hooks failing, simply add an explicit dependency:
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- setuptools
- flake8-logging-format
In
whitelist.py
, there is an import onpkg_resources
fromsetuptools
.https://github.com/globality-corp/flake8-logging-format/blob/b7da42d1593ca19c5390be1e710439d0c45099ac/logging_format/whitelist.py#L5
This makes the code fail on environments without setuptools.
I suggest avoiding using the package altogether or making it a dependency (eventually optional)