Skip to content

Commit

Permalink
[9.16] chg:test: Disable too-many/too-few pylint checks
Browse files Browse the repository at this point in the history
Enforcing pylint standards and default for our test code seems
counter-productive. Since most of the newly added code are tests or is
test-related, encountering these checks rarely make us refactor the code
in other ways and we just disable these checks individually. Code that
is too complex or convoluted will be pointed out in reviews anyways.

(cherry picked from commit f7319a38cf277c2140f0ed7ab46fd616b9322587)

Backport of MR !9626

Merge branch 'backport-nicki/pylint-disable-too-few-too-many-checks-9.16' into 'bind-9.16'

See merge request isc-projects/bind9!9806
  • Loading branch information
Mno-hime committed Dec 3, 2024
2 parents 31d8e3b + d4fb094 commit 40ecc8a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
12 changes: 12 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,17 @@ disable=
C0115, # missing-class-docstring
C0116, # missing-function-docstring
C0209, # consider-using-f-string
C0302, # too-many-lines
C0415, # import-outside-toplevel
R0801, # duplicate-code
R0901, # too-many-ancestors
R0902, # too-many-instance-attributes
R0903, # too-few-public-methods
R0904, # too-many-public-methods
R0911, # too-many-return-statements
R0912, # too-many-branches
R0913, # too-many-arguments
R0914, # too-many-locals
R0915, # too-many-statements
R0916, # too-many-boolean-expressions
R0917, # too-many-positional-arguments
2 changes: 0 additions & 2 deletions bin/tests/system/shutdown/tests_shutdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def do_work(named_proc, resolver, rndc_cmd, kill_method, n_workers, n_queries):
:param n_queries: Total number of queries to send
:type n_queries: int
"""
# pylint: disable-msg=too-many-arguments
# pylint: disable-msg=too-many-locals

# helper function, args must be a list or tuple with arguments to rndc.
def launch_rndc(args):
Expand Down
4 changes: 0 additions & 4 deletions bin/tests/system/tsiggss/tests_isc_spnego_flaws.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@


class CraftedTKEYQuery:
# pylint: disable=too-few-public-methods

"""
A class for preparing crafted TKEY queries
"""
Expand Down Expand Up @@ -80,8 +78,6 @@ def _with_len(self, data: bytes) -> bytes:


class ASN1Encoder:
# pylint: disable=too-few-public-methods

"""
A custom ASN1 encoder which allows preparing malformed GSSAPI tokens
"""
Expand Down
2 changes: 1 addition & 1 deletion doc/arm/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
try:
from sphinx.util.docutils import ReferenceRole
except ImportError:
# pylint: disable=too-few-public-methods

class ReferenceRole(roles.GenericRole):
"""
The ReferenceRole class (used as a base class by GitLabRefRole
Expand Down
3 changes: 0 additions & 3 deletions util/parse_tsan.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
class State:
"""Class that holds state of the TSAN parser."""

# pylint: disable=too-many-instance-attributes
# pylint: disable=too-few-public-methods

inside = False
block = ""
last_line = None
Expand Down

0 comments on commit 40ecc8a

Please sign in to comment.