error: cannot format /home/wojtek/workspace/portal/pustasz/apps/categories/permissions.py: INTERNAL ERROR: Black produced different code on the second pass of the formatter. #1920
Labels
C: unstable formatting
Formatting changed on the second pass
R: duplicate
This issue or pull request already exists
T: bug
Something isn't working
Describe the bug A clear and concise description of what the bug is.
Formatting with black via
pre-commit
hook cannot find a way to properly format style in long and complex if/else statementsTo Reproduce Steps to reproduce the behavior:
See
Additional context
paragraph for settings and file content which causes an error.git commit -m "foo"
Expected behavior A clear and concise description of what you expected to happen.
Pre-commit fails in the first run, but it gives a formatting solution for a file. After fixing formatting pre-commit passes for black.
Environment (please complete the following information):
Does this bug also happen on master?
Yes, it does. I've run file content on online formatter and it spits out same error as in title:
Additional context Add any other context about the problem here.
pyproject.toml
config:pre-commit
config:File is added as a .txt attachement
Thanks for help in advance!
permissions.txt
The text was updated successfully, but these errors were encountered: