-
-
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
Changes from 6 commits
a5d5b08
d2c2bba
ad7977a
a14bed8
90d31e8
d6dd098
82243cd
dcebd72
7e359c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. yeah autopep8 did that, i've just pushed after running black |
||
len_stack_minus_one -= 1 | ||
if visited.count(node[1]) < 1: | ||
stack.append(node[1]) | ||
|
@@ -453,7 +455,10 @@ def has_cycle(self): | |
break | ||
else: | ||
return True | ||
anticipating_nodes.add(stack[len_stack_minus_one]) | ||
# TODO: the following code is unreachable | ||
# is this meant to be called in the else ? | ||
anticipating_nodes.add( | ||
stack[len_stack_minus_one]) | ||
len_stack_minus_one -= 1 | ||
if visited.count(node[1]) < 1: | ||
stack.append(node[1]) | ||
|
Uh oh!
There was an error while loading. Please reload this page.