-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Enable pattern matching syntax by default #2662
Comments
Black 21.11b1 does have experimental support for pattern matching syntax, but since it's experimental and is / was quite buggy we decided to lock it under the |
It is supported, but you need to explicitly set I think we should consider turning it on by default, so I'll rename this issue to reflect that suggestion. cc @isidentical |
Thanks for the quick replies. I'll try out |
Confirmed that at least this basic example works with |
FWIW would be great experience if |
Is there a way to specify this in a configuration file? I would like the editors for all the members of my team to automatically have this flag set. |
|
Describe the bug
PEP 634 introduces structural pattern matching in python 3.10. Black at 21.11b1 (latest) does not seem to support this new syntax.
To Reproduce
Here is a basic example of the new syntax, which we will save in
match_test.py
:Expected behavior
Structural pattern matching (and all other new python 3.10 syntax) should be fully supported.
Environment
The text was updated successfully, but these errors were encountered: