]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix 'Import should be placed at the top of the module'
authorŠtěpán Balážik <stepan@isc.org>
Tue, 27 Jan 2026 23:01:35 +0000 (00:01 +0100)
committerŠtěpán Balážik <stepan@isc.org>
Wed, 25 Feb 2026 12:15:05 +0000 (13:15 +0100)
In preparation for running pylint on more Python code.

(cherry picked from commit 4253d7298c3ba0c4bbd20194bff7d0d4832409c1)

bin/tests/system/ans.py
bin/tests/system/conftest.py
bin/tests/system/dnssec-malformed-dnskey/tests_malformed_dnskey.py
bin/tests/system/ixfr/ans2/ans.py

index 9dbdee11c1dfc39ee587d1bff178ae4ea41ede46..6ac5498d1dbcaa971ffba10f463c69c366a1ff64 100644 (file)
@@ -9,9 +9,7 @@ file, you can obtain one at https://mozilla.org/MPL/2.0/.
 
 See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
-"""
 
-"""
 This is a bare-bones DNS server that only serves data from zone files.  It is
 meant to be used as a replacement for full-blown named instances in system
 tests when a given server is only required to return zone-based data.
index 49126d9788a4b1e8625616ace2c511244a57574e..c00161d39da7cc60fe1105411e2a6240362de72f 100644 (file)
@@ -23,9 +23,12 @@ import pytest
 
 pytest.register_assert_rewrite("isctest")
 
+# pylint: disable=wrong-import-position
 import isctest
 from isctest.vars.dirs import SYSTEM_TEST_DIR_GIT_PATH
 
+# pylint: enable=wrong-import-position
+
 # Silence warnings caused by passing a pytest fixture to another fixture.
 # pylint: disable=redefined-outer-name
 
index d66644ce7b26494c933d557b37be92498e60399f..2e6c667d22c6649c5b3d39f08bd9bbec9a8a0ea3 100644 (file)
@@ -15,8 +15,6 @@ from re import compile as Re
 import os
 import pytest
 
-pytest.importorskip("cryptography")
-
 from cryptography.hazmat.primitives.asymmetric import ec
 
 import dns
index 86592444264bc24b5ff277408d37cc7d1bd574e2..37b22917216e68666c37638fb8c14afe8fb02db0 100644 (file)
@@ -11,6 +11,8 @@ See the COPYRIGHT file distributed with this work for additional
 information regarding copyright ownership.
 """
 
+from typing import AsyncGenerator, Collection, Iterable
+
 import abc
 
 import dns.rcode
@@ -18,8 +20,6 @@ import dns.rdataclass
 import dns.rdatatype
 import dns.rrset
 
-from typing import AsyncGenerator, Collection, Iterable
-
 from isctest.asyncserver import (
     ControllableAsyncDnsServer,
     DnsResponseSend,