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

Space before method brackets for built-in functions #49

Closed
loechel opened this issue Mar 21, 2018 · 1 comment
Closed

Space before method brackets for built-in functions #49

loechel opened this issue Mar 21, 2018 · 1 comment
Labels
T: bug Something isn't working

Comments

@loechel
Copy link

loechel commented Mar 21, 2018

I have the problem that black does a reformat of built-in functions, in my case on exec and eval as those have been statements in Python 2 but are methods in Python 3.

-        return exec("code", {}, {})
+        return exec ("code", {}, {})

Operating system: MacOS
Python version: 3.6.4
Black version: black, version 18.3a3
Does also happen on master: Yes

@ambv ambv added T: bug Something isn't working lib2to3 labels Mar 21, 2018
@ambv
Copy link
Collaborator

ambv commented Mar 21, 2018

Yes, this is indeed a bug stemming from usage of lib2to3. We should probably just don't allow for the old exec and eval forms.

@ambv ambv added this to To Do in Getting to beta Mar 21, 2018
@ambv ambv closed this as completed in bae4a1c Mar 23, 2018
Getting to beta automation moved this from To Do to Done Mar 23, 2018
ambv added a commit that referenced this issue Mar 23, 2018
Note: if those are handled, you can't use --safe because this check is using
Python 3.6+ builtin AST.

Fixes #49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants