Remove superfluous 'pylint: disable' directives

Some of these have been fixed already, fix the rest.
This commit is contained in:
Štěpán Balážik 2026-02-09 15:10:36 +01:00
parent b00f16f026
commit 08f5e5ebd1
36 changed files with 3 additions and 76 deletions

View file

@ -13,8 +13,7 @@ import sys
try:
import yaml
# pylint: disable=bare-except
except:
except ImportError:
print("No python yaml module, skipping")
sys.exit(1)

View file

@ -135,9 +135,8 @@ class SubDIG:
return command
def run(self):
# pylint: disable=consider-using-with
with open(os.devnull, "w", encoding="utf-8") as devnull:
self.sub_process = subprocess.Popen(
self.sub_process = subprocess.Popen( # pylint: disable=consider-using-with
self.get_command(), shell=True, stdout=devnull
)

View file

@ -11,11 +11,8 @@
from collections import ChainMap
# pylint: enable=import-error
from .algorithms import ALG_VARS, CRYPTO_SUPPORTED_VARS
from .basic import BASIC_VARS
# pylint: disable=import-error
from .build import BUILD_VARS # type: ignore
from .dirs import DIR_VARS
from .features import FEATURE_VARS

View file

@ -11,12 +11,8 @@
import os
# pylint: disable=import-error
from .build import BUILD_VARS # type: ignore
# pylint: enable=import-error
BASIC_VARS = {
"ARPANAME": f"{BUILD_VARS['TOP_BUILDDIR']}/arpaname",
"CDS": f"{BUILD_VARS['TOP_BUILDDIR']}/dnssec-cds",

View file

@ -11,12 +11,8 @@
import os
# pylint: disable=import-error
from .build import BUILD_VARS, SYSTEM_TEST_DIR_GIT_PATH # type: ignore
# pylint: enable=import-error
DIR_VARS = {
"builddir": f"{BUILD_VARS['TOP_BUILDDIR']}/{SYSTEM_TEST_DIR_GIT_PATH}",
"srcdir": f"{BUILD_VARS['TOP_SRCDIR']}/{SYSTEM_TEST_DIR_GIT_PATH}",

View file

@ -86,7 +86,6 @@ def token_init_and_cleanup():
assert Re("Found token (.*) with matching token label") in cmd.out
# pylint: disable-msg=too-many-locals
@pytest.mark.parametrize(
"alg_name,alg_type,alg_bits",
[

View file

@ -509,7 +509,6 @@ def check_signedkeyresponse(
# collect keys that should be in this bundle
# collect lines that should be in this bundle
bundle_keys.append(key)
# pylint: disable=unused-variable
for _arg in expected_cds:
bundle_lines.append(lines[line_no])
line_no += 1

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import shutil
import time

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import os
import dns

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import os
import time

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import shutil
from nsec3.common import NSEC3_MARK, check_nsec3_case

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import os
import dns

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
from datetime import timedelta
import os

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from isctest.util import param

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from isctest.kasp import KeyTimingMetadata

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=unused-import
import pytest
from isctest.util import param

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from isctest.kasp import KeyTimingMetadata

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
from datetime import timedelta
import pytest

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
from datetime import timedelta
import pytest

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
from rollover.common import CDSS, DEFAULT_CONFIG, ROLLOVER_MARK
import isctest

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from isctest.kasp import Ipub, IpubC, Iret

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from rollover.common import CDSS, DURATION, ROLLOVER_MARK, UNSIGNING_CONFIG

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from rollover.common import (

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
from datetime import timedelta
from isctest.kasp import KeyTimingMetadata

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
from datetime import timedelta
import pytest

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from isctest.util import param

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from isctest.util import param

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
from datetime import timedelta
import os

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, ROLLOVER_MARK

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
import pytest
from rollover.common import CDSS, DEFAULT_CONFIG, DURATION, ROLLOVER_MARK

View file

@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=redefined-outer-name,unused-import
from datetime import timedelta
import pytest

View file

@ -11,8 +11,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=unused-variable
import socket
import struct
import time

View file

@ -11,8 +11,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=unused-variable
import socket
import time
@ -25,7 +23,7 @@ import dns.rdataclass
import dns.rdatatype
import pytest
import isctest.mark # pylint: disable=import-error
import isctest.mark
pytestmark = pytest.mark.extra_artifacts(
[

View file

@ -11,8 +11,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# pylint: disable=unused-variable
import socket
import time

View file

@ -146,7 +146,6 @@ sys.path.append(str(Path(__file__).resolve().parent.parent / "misc"))
# -- Project information -----------------------------------------------------
project = "BIND 9"
# pylint: disable=redefined-builtin
copyright = "2023, Internet Systems Consortium"
author = "Internet Systems Consortium"

View file

@ -35,11 +35,9 @@ sys.path.append(str(Path(__file__).resolve().parent.parent / "misc"))
# -- Project information -----------------------------------------------------
project = "BIND 9"
# pylint: disable=wrong-import-position
import datetime
year = datetime.datetime.now().year
# pylint: disable=redefined-builtin
copyright = "%d, Internet Systems Consortium" % year
author = "Internet Systems Consortium"
@ -67,7 +65,6 @@ exclude_patterns = [
# The master toctree document.
master_doc = "index"
# pylint: disable=line-too-long
man_pages = [
(
"arpaname",