Skip to content

Commit

Permalink
Add setuptools to dependencies for flake8
Browse files Browse the repository at this point in the history
As of Python 3.12, setuptools is no longer installed into venvs by default: pypa/virtualenv#2487

flake8-logging-format depends on setuptools without explicitely declaring it: globality-corp/flake8-logging-format#68

Add setuptools to additional_dependencies in pre-commit config to avoid issue when running pre-commit hooks with Python 3.12:
Flake8 failed to load plugin "flake8-logging-format" due to No module named 'pkg_resources'.
  • Loading branch information
bdabelow committed May 29, 2024
1 parent 732b950 commit 6be4b63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ repos:
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies: ["flake8-pyproject", "flake8-logging-format", "pep8-naming"]
# setuptools is required by flake8-logging-format, but not declared
# as dependency.
additional_dependencies: ["flake8-pyproject", "flake8-logging-format", "pep8-naming", "setuptools"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
hooks:
Expand Down

0 comments on commit 6be4b63

Please sign in to comment.