]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable too-many/too-few pylint checks
authorNicki Křížek <nicki@isc.org>
Mon, 14 Oct 2024 12:44:06 +0000 (14:44 +0200)
committerMichal Nowak <mnowak@isc.org>
Tue, 3 Dec 2024 09:42:58 +0000 (10:42 +0100)
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 7639c58c4889003777e5da36567f84caa424f157)

.pylintrc
bin/tests/system/shutdown/tests_shutdown.py
bin/tests/system/tsiggss/tests_isc_spnego_flaws.py
doc/arm/conf.py
util/parse_tsan.py

index f9b1110547fb1fde382feeff3ec667882587aad2..2998c45800630636dc939bdef0659579fcfebe99 100644 (file)
--- a/.pylintrc
+++ b/.pylintrc
@@ -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
index 1eb502890a4bd3a4b8d19b3942bb69fc0352ddad..11fb673a3fcc9243f916ce0667b144079e4f2f15 100755 (executable)
@@ -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):
index 6340b5abf88f8e448376aa599e985d4ac32bc8cd..91ad8596169aef5ae9d4f130c79d767d5a69ecd7 100755 (executable)
@@ -34,8 +34,6 @@ import dns.rrset
 
 
 class CraftedTKEYQuery:
-    # pylint: disable=too-few-public-methods
-
     """
     A class for preparing crafted TKEY queries
     """
@@ -80,8 +78,6 @@ class CraftedTKEYQuery:
 
 
 class ASN1Encoder:
-    # pylint: disable=too-few-public-methods
-
     """
     A custom ASN1 encoder which allows preparing malformed GSSAPI tokens
     """
index f2dd2e60926001c8d0360eede928ca600160dea0..9f54fbe27f0171accd1a5e18193c652a32a5af4e 100644 (file)
@@ -22,7 +22,7 @@ from sphinx import addnodes
 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
index f533ca9c9548809ebd40480cbb292bf288ef0834..7a1d2b6d5e1aa55e6c2670839148722ffb7118c7 100755 (executable)
@@ -23,9 +23,6 @@ from hashlib import sha256
 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