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

Code quality #1773

Open
wants to merge 1 commit into
base: v0.6
Choose a base branch
from
Open

Code quality #1773

wants to merge 1 commit into from

Conversation

PeterSurda
Copy link
Member

A couple of code quality fixes.

@PeterSurda PeterSurda added the developers The issue is relevant mainly for developers rather than users label Jun 2, 2021
@PeterSurda PeterSurda added this to To do in Code quality via automation Jun 2, 2021
@@ -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)
Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Member Author

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
Copy link
Collaborator

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

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developers The issue is relevant mainly for developers rather than users
Projects
Code quality
  
To do
Development

Successfully merging this pull request may close these issues.

None yet

3 participants