Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error while using flake8-django on a fresh python 3.12 install #144

Open
frague59 opened this issue Aug 9, 2024 · 0 comments

Comments

@frague59
Copy link

frague59 commented Aug 9, 2024

Hi,

I'm using flake8-django as a pre-commit flake8 plugin, and I've an issue while pre-commit installs it (in my local .git venv)

Installs

$ python --version
Python 3.12.4
$ pre-commit --version
pre-commit 3.8.0

pre-commit is installed globally through pipx

pipx install pre-commit

My pre-commit config file

$ cat .pre-commit-config.yaml
...
  - repo: https://github.com/john-hen/Flake8-pyproject
    rev: 1.2.3
    hooks:
      - id: Flake8-pyproject
        additional_dependencies:
          - flake8-django
          - flake8-bugbear
          - flake8-builtins
          - flake8-comprehensions
          - flake8-cognitive-complexity
          - flake8-alfred
          - flake8-logging
          - flake8-logging-format
          - flake8-printf-formatting
          - flake8-pep3101
          - flake8-docstrings
          - flake8-rst-docstrings
          - flake8-string-format
          - flake8-print 

Error message

$ pre-commit run Flake8-pyproject --all
Flake8-pyproject.........................................................Failed
- hook id: Flake8-pyproject
- exit code: 1

src/commrequest/models/helpers.py: "flake8-django[DJ0]" failed during execution due to AttributeError("'TreeRebuilder' object has no attribute 'visit_typealias'")
Run flake8 with greater verbosity to see more details
0

Workaround

When I disable the flake8-django, the pre-commit works (without the django checks).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant