pre-commit hook fails to format code with the Structural Pattern Matching #2732
Labels
C: integrations
Editor plugins and other integrations
R: not a bug
This is deliberate behavior of Black.
S: awaiting response
Waiting for futher information from OP
T: user support
OP looking for assistance or answers to a question
Describe the bug
pre-commit hook fails to format code with the Structural Pattern Matching PEP 0622.
To Reproduce
Files
.pre-commit-config.yaml
:pyproject.toml
:file_with_310_features.py
file_without_310_features.py
Setup
pip install black==21.12b0 pre-commit git init git add . pre-commit install
And run it with these arguments:
The resulting error is:
Expected behavior
Pre-commit hooks should format both
file_with_310_features.py
andfile_without_310_features.py
; they are valid python 3.10.Environment
FYI
I can format the file with Python 3.10 features just fine:
The text was updated successfully, but these errors were encountered: