codeql PEP8 first argument should be self#16518
codeql PEP8 first argument should be self#16518jsoref wants to merge 27 commits intoPowerDNS:masterfrom
Conversation
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…callback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
….callback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…Callback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…Callback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…Callback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…gPathCallback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…llback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…hableCallback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…entAddr2Callback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…entAddr1Callback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
…lback Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
miodvallat
left a comment
There was a problem hiding this comment.
As someone who always types slef when trying to type self, I am strongly opposed to that PR.
| """ | ||
| _verboseMode = True | ||
|
|
||
| def NoSVCCallback(request): |
There was a problem hiding this comment.
I don't think this is the right fix, shouldn't these methods become static instead?
There was a problem hiding this comment.
I didn't try to reason through these because it looked like they were passed through a function callback. It required more python alertness than I have in the morning. -- Someone who's comfortable w/ python should weigh in.
There was a problem hiding this comment.
ok, I'm convinced it should be a staticmethod.
I'll do this from home.
| """ | ||
|
|
||
| def callback(request, headers, fromQueue, toQueue): | ||
| def callback(self, headers, fromQueue, toQueue): |
There was a problem hiding this comment.
Same here, I think they should be static methods.
| return None | ||
|
|
||
| def from_wire(cls, otype, wire, current, olen): | ||
| def from_wire(self, otype, wire, current, olen): |
There was a problem hiding this comment.
Ok, I think this is the correct change:
| def from_wire(self, otype, wire, current, olen): | |
| @classmethod | |
| def from_wire(cls, otype, wire, current, olen): |
| """ | ||
| _verboseMode = True | ||
|
|
||
| def NoSVCCallback(request): |
There was a problem hiding this comment.
ok, I'm convinced it should be a staticmethod.
I'll do this from home.
Short description
codeql complains (per PEP8) when the first argument to methods is not
self: https://github.com/check-spelling-sandbox/pdns/security/quality/rules/py%2Fnot-named-selfChecklist
I have: