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

E711/E712 not correcting #489

Closed
graingert opened this issue Jun 21, 2019 · 2 comments
Closed

E711/E712 not correcting #489

graingert opened this issue Jun 21, 2019 · 2 comments
Assignees
Milestone

Comments

@graingert
Copy link

graingert commented Jun 21, 2019

Python Code

h = None
assert None == hj

Command Line

$ autopep8 --in-place -aaaaaa --ignore-local-config --select E711,E712 -r foo.py 

I expected to get

h = None
assert None is h
@Hanaasagi
Copy link
Contributor

Hanaasagi commented Jun 24, 2019

h = None
assert None == h
assert h == None

After formatted byautopep8 --aggressive t.py.

h = None
assert None == h
assert h is None

It will not work when None is a left operand. Confirmed and briefly checked the code.

autopep8/autopep8.py

Lines 1067 to 1068 in fff90d4

if not right.startswith('None'):
return []

It just return 😳. If the additional check is unneeded, I can pull request to resolve.

@hhatto hhatto self-assigned this Aug 15, 2019
@hhatto hhatto added this to the 1.5 milestone Dec 5, 2019
@hhatto
Copy link
Owner

hhatto commented Dec 5, 2019

this is fix in #498 .

I plan release to version 1.5.

@hhatto hhatto closed this as completed Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants