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

Add fix_nonzero fixer to rename and alias __nonzero__ to __bool__. #205

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jamesdbowman
Copy link

No description provided.

reassignment = Node(syms.suite, [
Newline(),
Leaf(token.INDENT,
find_indentation(bool_funcdef.children[-1].children[1])),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace bool_funcdef.children[-1] with bool_funcdef_suite.

@jamesdbowman
Copy link
Author

@graingert saw you were recently added as a maintainer to this project, any thoughts on this PR? Thanks in advance.

@graingert
Copy link
Member

graingert commented Aug 17, 2020

Imho this would need support in six with a @six.python_2_bool_compatible decorator. Otherwise it should be added to fissix without the backwards compatible use of six

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

Successfully merging this pull request may close these issues.

None yet

2 participants