-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
chore: Remove unreachable return statements #17622
chore: Remove unreachable return statements #17622
Conversation
Codecov Report
@@ Coverage Diff @@
## master #17622 +/- ##
=======================================
Coverage 68.55% 68.55%
=======================================
Files 1601 1601
Lines 65271 65270 -1
Branches 6966 6966
=======================================
+ Hits 44745 44746 +1
+ Misses 18636 18634 -2
Partials 1890 1890
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -38,8 +38,6 @@ def is_port_open(host: str, port: int) -> bool: | |||
finally: | |||
s.close() | |||
|
|||
return False |
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.
bycatch: I notice that port
is an int
in the argument list, but we're recasting it to int
on line 33, which is unnecessary. While we're at it, I'd almost recommend removing that cast, and make sure code ever calls this function with anything except an int
value.
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.
Good spot; I have taken out the int
cast - by the looks of it, is_port_open()
is only used here, where port
is indeed an integer.
Remove unreachable return statements in
superset/utils/network.py
.SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION