]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Define __all__ in __init__.py files
authorŠtěpán Balážik <stepan@isc.org>
Wed, 28 Jan 2026 17:49:34 +0000 (18:49 +0100)
committerŠtěpán Balážik <stepan@isc.org>
Fri, 20 Feb 2026 14:17:32 +0000 (15:17 +0100)
Fix ruff's F401 unused-import errors in these files.

Also sort them with: ruff check --extend-select RUF022 --fix.

bin/tests/system/conftest.py
bin/tests/system/isctest/__init__.py
bin/tests/system/isctest/hypothesis/__init__.py
bin/tests/system/isctest/log/__init__.py
bin/tests/system/isctest/vars/__init__.py
pyproject.toml

index a9c3fc47dfa98b4763f370ed547703a85c59862f..089d5ed52cb4ffd7f3164a36ebfba3b015a66ba8 100644 (file)
@@ -260,7 +260,7 @@ def configure_algorithm_set(request):
         name = None
     else:
         name = mark.args[0]
-    isctest.vars.set_algorithm_set(name)
+    isctest.vars.algorithms.set_algorithm_set(name)
 
 
 @pytest.fixture(autouse=True)
index c5e4fc0ed54661a7756a1abb4e2c6fa4551a374f..b1731f5cd5c6f1e9399d9608d92f6244c09d1207 100644 (file)
@@ -25,3 +25,15 @@ from . import (  # pylint: disable=redefined-builtin
 # environment variables which might not be set at the time of import of the
 # `isctest` package. To use the marks, manual `import isctest.mark` is needed
 # instead.
+
+__all__ = [
+    "check",
+    "hypothesis",
+    "instance",
+    "kasp",
+    "log",
+    "query",
+    "run",
+    "template",
+    "vars",
+]
index e4cda096293c7b8b1c35c9ecae98136b78a6703e..7123496b533ffeefd30cb124ab428db5f2fb2166 100644 (file)
@@ -9,7 +9,9 @@
 # See the COPYRIGHT file distributed with this work for additional
 # information regarding copyright ownership.
 
-# This ensures we're using a suitable hypothesis version. A newer version is
-# required for FIPS-enabled platforms.
-
 from . import settings, strategies
+
+__all__ = [
+    "settings",
+    "strategies",
+]
index 45ec242e399604387e77d4331bd8e31eff0dc013..ea801b5bd62a212193c85046bf50224ab2ca2d94 100644 (file)
@@ -23,3 +23,19 @@ from .basic import (
     warning,
 )
 from .watchlog import WatchLogFromHere, WatchLogFromStart
+
+__all__ = [
+    "WatchLogFromHere",
+    "WatchLogFromStart",
+    "avoid_duplicated_logs",
+    "critical",
+    "debug",
+    "deinit_module_logger",
+    "deinit_test_logger",
+    "error",
+    "info",
+    "init_conftest_logger",
+    "init_module_logger",
+    "init_test_logger",
+    "warning",
+]
index 3fea2f345c74477ca478a5e4f1cc13828c46891f..82de02c75bdbbce2b7369724bd2299b1f5e8834c 100644 (file)
 import os
 
 from .. import log
-from .algorithms import init_crypto_supported, set_algorithm_set
+from . import algorithms, basic, build, dirs, features, openssl, ports
 from .all import ALL
-from .features import init_features
-from .openssl import parse_openssl_config
+
+__all__ = [
+    "ALL",
+    "algorithms",
+    "basic",
+    "build",
+    "dirs",
+    "features",
+    "init_vars",
+    "openssl",
+    "ports",
+]
 
 
 def init_vars():
     """Initializes the environment variables."""
-    init_features()
-    init_crypto_supported()
-    set_algorithm_set(os.getenv("ALGORITHM_SET"))
-    parse_openssl_config(ALL["OPENSSL_CONF"])
+    features.init_features()
+    algorithms.init_crypto_supported()
+    algorithms.set_algorithm_set(os.getenv("ALGORITHM_SET"))
+    openssl.parse_openssl_config(ALL["OPENSSL_CONF"])
 
     os.environ.update(ALL)
     log.debug("setting following env vars: %s", ", ".join([str(key) for key in ALL]))
index bb87900d7e0af142e9a3a218831a8d5399143cf9..6a8dc81bbe632fd83031d5f91b1eca596786b2a5 100644 (file)
@@ -92,6 +92,8 @@ target-version = "py310"
 lint.select = [
   # import order
   "I",
+  # sorted __all__
+  "RUF022",
   # f-strings
   "UP031",
   "UP032",