Skip to content

codeql PEP8 first argument should be self#16518

Merged
pieterlexis merged 27 commits into
PowerDNS:masterfrom
jsoref:codeql-pep8-first-argument-should-be-self
Jun 16, 2026
Merged

codeql PEP8 first argument should be self#16518
pieterlexis merged 27 commits into
PowerDNS:masterfrom
jsoref:codeql-pep8-first-argument-should-be-self

Conversation

@jsoref

@jsoref jsoref commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

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-self

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document, including the AI Policy, and added a "Signed-off-by" to my commits
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
  • checked that this code was merged to master

miodvallat
miodvallat previously approved these changes Nov 17, 2025

@miodvallat miodvallat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As someone who always types slef when trying to type self, I am strongly opposed to that PR.

Comment thread regression-tests.dnsdist/test_BackendDiscovery.py
Comment thread regression-tests.dnsdist/test_OutgoingDOH.py Outdated
@jsoref jsoref marked this pull request as draft November 17, 2025 14:53
Comment thread regression-tests.auth-py/clientsubnetoption.py Outdated
Comment thread regression-tests.dnsdist/test_BackendDiscovery.py
@pieterlexis

Copy link
Copy Markdown
Contributor

Hey @jsoref,

Do you intend to finish this PR? Or should one of us pick this up?

@jsoref

jsoref commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Please pick it up.

@pieterlexis pieterlexis force-pushed the codeql-pep8-first-argument-should-be-self branch from 4739980 to d3f1242 Compare June 3, 2026 07:46
@pieterlexis

Copy link
Copy Markdown
Contributor

I just rebased this on master and updated several callbacks to staticmethods. Now putting it through the CI paces. I'll add a PEP-8 check later as well.

@coveralls

coveralls commented Jun 3, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 27534638053

Coverage increased (+0.02%) to 71.093%

Details

  • Coverage increased (+0.02%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 49 coverage regressions across 11 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

49 previously-covered lines in 11 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
pdns/recursordist/test-syncres_cc1.cc 11 79.9%
pdns/recursordist/syncres.cc 8 81.31%
pdns/rcpgenerator.cc 5 89.29%
pdns/dnsdistdist/dnsdist-carbon.cc 4 59.8%
pdns/dnsdistdist/dnsdist-lbpolicies.cc 4 73.87%
pdns/dnsdistdist/dnsdist-tcp.cc 4 74.59%
pdns/misc.cc 4 61.78%
modules/gpgsqlbackend/spgsql.cc 3 63.78%
pdns/iputils.cc 3 60.18%
pdns/recursordist/negcache.hh 2 90.63%

Coverage Stats

Coverage Status
Relevant Lines: 171240
Covered Lines: 133419
Line Coverage: 77.91%
Relevant Branches: 81876
Covered Branches: 46528
Branch Coverage: 56.83%
Branches in Coverage %: Yes
Coverage Strength: 6628444.24 hits per line

💛 - Coveralls

@pieterlexis pieterlexis requested a review from rgacogne June 3, 2026 09:16
@pieterlexis pieterlexis marked this pull request as ready for review June 3, 2026 09:16
Comment thread regression-tests.dnsdist/test_BackendDiscovery.py Outdated
Comment thread regression-tests.dnsdist/test_BackendDiscovery.py Outdated
Comment thread regression-tests.dnsdist/test_BackendDiscovery.py Outdated
Comment thread regression-tests.dnsdist/test_BackendDiscovery.py Outdated
Comment thread regression-tests.dnsdist/test_BackendDiscovery.py Outdated
Comment thread regression-tests.dnsdist/test_BackendDiscovery.py Outdated
Comment thread regression-tests.dnsdist/test_BackendDiscovery.py Outdated
@pieterlexis pieterlexis force-pushed the codeql-pep8-first-argument-should-be-self branch from 45fb9bb to 8919136 Compare June 4, 2026 08:12
@pieterlexis pieterlexis requested a review from rgacogne June 4, 2026 08:13
rgacogne
rgacogne previously approved these changes Jun 4, 2026
@pieterlexis

Copy link
Copy Markdown
Contributor

ugh, the signoffs disappeared during the rebase and amends.

@pieterlexis pieterlexis force-pushed the codeql-pep8-first-argument-should-be-self branch from 8919136 to 657bc3e Compare June 4, 2026 08:34
jsoref added 12 commits June 15, 2026 10:41
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
jsoref and others added 15 commits June 15, 2026 10:44
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
…back

Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
…back

Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
Signed-off-by: Pieter Lexis <pieter.lexis@powerdns.com>
@pieterlexis pieterlexis force-pushed the codeql-pep8-first-argument-should-be-self branch from 657bc3e to 4776f69 Compare June 15, 2026 08:44
@pieterlexis pieterlexis requested a review from rgacogne June 15, 2026 08:45
@pieterlexis pieterlexis merged commit ca23d22 into PowerDNS:master Jun 16, 2026
85 checks passed
@jsoref jsoref deleted the codeql-pep8-first-argument-should-be-self branch June 16, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants