C0116, # missing-function-docstring
C0209, # consider-using-f-string
C0301, # line-too-long, handled better by black
+ 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
@pytest.fixture(scope="module")
-def system_test_dir(
- request, system_test_name
-): # pylint: disable=too-many-statements,too-many-locals
+def system_test_dir(request, system_test_name):
"""
Temporary directory for executing the test.
unlink(symlink_dst)
-def _run_script( # pylint: disable=too-many-arguments
+def _run_script(
system_test_dir: Path,
interpreter: str,
script: str,
@pytest.fixture(scope="module", autouse=True)
-def system_test( # pylint: disable=too-many-arguments,too-many-statements
+def system_test(
request,
system_test_dir,
shell,
loop.create_task(handler_coroutine)
-# pylint: disable=too-few-public-methods
class AsyncServer:
"""
A generic asynchronous server which may handle UDP and/or TCP traffic.
TCP = enum.auto()
-# pylint: disable=too-many-instance-attributes
@dataclass
class QueryContext:
"""
```
"""
- # pylint: disable=too-many-arguments
def __init__(
self,
identifier: str,
assert f"key: {key.tag}" in response
-# pylint: disable=too-many-branches,too-many-locals
def _check_signatures(signatures, covers, fqdn, keys):
now = KeyTimingMetadata.now()
numsigs = 0
assert numkeys == len(dnskeys)
-# pylint: disable=too-many-locals
def check_cds(rrset, keys):
# Check if the correct CDS records are published. If the current time
# is between the timing metadata 'publish' and 'delete', the key must have
QUERY_TIMEOUT = 10
-# pylint: disable=too-many-arguments
def generic_query(
query_func: Callable[..., Any],
message: dns.message.Message,
import subprocess
-# pylint: disable=too-few-public-methods
class RNDCExecutor(abc.ABC):
"""
An interface which RNDC executors have to implement in order for the
import dns.message
-def cmd( # pylint: disable=too-many-arguments
+def cmd(
args,
cwd=None,
timeout=60,
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
-# pylint: disable=too-many-lines
-
from datetime import timedelta
import difflib
import os
return out.stdout.decode("utf-8"), out.stderr.decode("utf-8")
-# pylint: disable=too-many-arguments,too-many-branches,too-many-locals,too-many-statements
def check_keys(
keys,
lifetime,
assert line_no == len(lines)
-# pylint: disable=too-many-arguments,too-many-branches,too-many-locals,too-many-statements
def check_signedkeyresponse(
out,
zone,
assert "dnssec-ksr: fatal: 'sign' requires a KSR file" in err
-# pylint: disable=too-many-locals,too-many-statements
def test_ksr_common(servers):
# common test cases (1)
zone = "common.test"
isctest.kasp.check_subdomain(ns1, zone, ksks, overlapping_zsks)
-# pylint: disable=too-many-locals
def test_ksr_lastbundle(servers):
zone = "last-bundle.test"
policy = "common"
assert f"zone {zone}/IN (signed): zone_rekey: {warning}" in ns1.log
-# pylint: disable=too-many-locals
def test_ksr_inthemiddle(servers):
zone = "in-the-middle.test"
policy = "common"
assert f"zone {zone}/IN (signed): zone_rekey: {warning}" not in ns1.log
-# pylint: disable=too-many-locals
def check_ksr_rekey_logs_error(server, zone, policy, offset, end):
n = 1
)
-# pylint: disable=too-many-locals
def test_ksr_unlimited(servers):
zone = "unlimited.test"
policy = "unlimited"
isctest.kasp.check_subdomain(ns1, zone, ksks, zsks)
-# pylint: disable=too-many-locals
def test_ksr_twotone(servers):
zone = "two-tone.test"
policy = "two-tone"
: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, 'command' is the rndc command to run
def launch_rndc(command):
class CraftedTKEYQuery:
- # pylint: disable=too-few-public-methods
-
"""
A class for preparing crafted TKEY queries
"""
class ASN1Encoder:
- # pylint: disable=too-few-public-methods
-
"""
A custom ASN1 encoder which allows preparing malformed GSSAPI tokens
"""
return outlist
-# pylint: disable=too-many-statements
def domain_factory(domainname, domainlabel, todolist, grammar):
"""
Return parametrized Sphinx domain object.
]
)
- # pylint: disable=too-many-arguments
def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
"""
Sphinx API:
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
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