-
Notifications
You must be signed in to change notification settings - Fork 573
Code quality #1773
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
base: v0.6
Are you sure you want to change the base?
Code quality #1773
Conversation
@@ -21,7 +21,7 @@ class UDPSocket(BMProto): # pylint: disable=too-many-instance-attributes | |||
port = 8444 | |||
|
|||
def __init__(self, host=None, sock=None, announcing=False): | |||
# pylint: disable=bad-super-call | |||
# pylint: disable=bad-super-call, access-member-before-definition | |||
super(BMProto, self).__init__(sock=sock) |
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.
super(UDPSocket, self).__init__(sock=sock)
?
@@ -97,22 +97,30 @@ def bm_command_addr(self): | |||
time.time() | |||
return True | |||
|
|||
# override the protocol do ignore the following commands on UDP | |||
# we do this mainly for security reasons |
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.
This is more of inheritance flow. Maybe UDPSocket
should inherit from some more basic class?
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.
Perhaps.
@@ -21,7 +21,7 @@ class UDPSocket(BMProto): # pylint: disable=too-many-instance-attributes | |||
port = 8444 | |||
|
|||
def __init__(self, host=None, sock=None, announcing=False): | |||
# pylint: disable=bad-super-call | |||
# pylint: disable=bad-super-call, access-member-before-definition |
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.
This is a bug: pylint-dev/pylint#2315
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.
The linked bug has been fixed. The ignore shouldn't be needed anymore.
fde350b
to
e8732f4
Compare
A couple of code quality fixes.