]> 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>
Fri, 20 Feb 2026 14:17:31 +0000 (15:17 +0100)
In preparation for running pylint on more Python code.

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 d71a3351c06f1e4d76cbe25e30b1f45348caafc4..157dc9faca69ee31aae9382e18d8e31e65121d44 100644 (file)
@@ -23,9 +23,12 @@ import pytest
 
 pytest.register_assert_rewrite("isctest")
 
+# pylint: disable=wrong-import-position
 import isctest
 from isctest.vars.build 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,