-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Fix some warnings from LGTM #2420
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
Conversation
Hey @Hasenn, TravisCI finished with status TravisBuddy Request Identifier: a51aa750-f58e-11ea-b8b5-77c9400cce29 |
Co-authored-by: Christian Clauss <cclauss@me.com>
Please run this PR thru psf/black. It knows how to format Python code. |
Hey @Hasenn, TravisCI finished with status TravisBuddy Request Identifier: a925b2d0-f58f-11ea-b8b5-77c9400cce29 |
@@ -226,7 +226,9 @@ def has_cycle(self): | |||
break | |||
else: | |||
return True | |||
anticipating_nodes.add(stack[len_stack_minus_one]) | |||
# TODO:The following code is unreachable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If code is unreachable then determine if the lines are useful. If they are then move the return statement below them. If they are not useful then delete them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i tried.. i can't read that part i don't really understand what it's supposed to do
anticipating_nodes.add( | ||
stack[len_stack_minus_one]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
psf/black will undo this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah autopep8 did that, i've just pushed after running black
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* fix assignment of a variable to itself * Fix unnecessary 'else' clause in loop * formatting and redundant reasignment fix * mark unreachable code with a TODO comment * fix variable defined multiple times * fix static method without static decorator * revert unintended autoformatting Co-authored-by: Christian Clauss <cclauss@me.com> * revert autoformatting issue * applied black autoformatting Co-authored-by: Christian Clauss <cclauss@me.com>
Describe your change:
fixes minor issues : variables assigned to themselves, for - else without any break, redundant redefinitions ...
Checklist:
Fixes: #{$ISSUE_NO}
.