-
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
Complex decorators break safe mode #2782
Comments
We may never have properly added support for https://www.python.org/dev/peps/pep-0614/. |
AFAIK the PEP 614 support is there: black/src/blib2to3/Grammar.txt Line 15 in 98db4ab
This seems like a problem with Black Playground, since they are still using Python 3.8. Created jpadilla/black-playground#53 @emfdavid what is the version of the python interpreter you are running the black with? |
Excellent catch @isidentical |
@emfdavid good idea, do you want to submit a PR? |
I would assume if people are using the newer syntax, their python version would be higher. Though in case of |
This has been now fixed on the playground as well! |
Using decorator syntax with a chained function call breaks the AST validation in safe mode.
This is a pattern for prometheus client
Use black playground repro case
If I comment out the chained labels - it works.
Currently my best work around is to ignore the files using this syntax in my config and run black manually with fast for those files.
The text was updated successfully, but these errors were encountered: