fix(backend): silence pylint false positives from lazy-load pattern

`undefined-all-variable` fires on CommitCancelled / Freezer / get_freezer
in __all__ because pylint can't see module-level __getattr__ bindings;
`global-statement` fires on the _BACKENDS singleton setter. Both are
intentional patterns — add inline disables rather than suppress globally.
This commit is contained in:
2026-07-14 08:21:42 +00:00
committed by didericis
parent 3fe90b3a88
commit 4b8b09ab83
+4 -4
View File
@@ -598,7 +598,7 @@ _BACKENDS: dict[str, BottleBackend[Any, Any]] | None = None
def _get_backends() -> dict[str, BottleBackend[Any, Any]]: def _get_backends() -> dict[str, BottleBackend[Any, Any]]:
"""Return the registry of all backend instances, loading lazily on first call.""" """Return the registry of all backend instances, loading lazily on first call."""
global _BACKENDS global _BACKENDS # pylint: disable=global-statement
if _BACKENDS is None: if _BACKENDS is None:
from .docker import DockerBottleBackend from .docker import DockerBottleBackend
from .firecracker import FirecrackerBottleBackend from .firecracker import FirecrackerBottleBackend
@@ -729,12 +729,12 @@ __all__ = [
"BottleCleanupPlan", "BottleCleanupPlan",
"BottlePlan", "BottlePlan",
"BottleSpec", "BottleSpec",
"CommitCancelled", "CommitCancelled", # pylint: disable=undefined-all-variable
"ExecResult", "ExecResult",
"Freezer", "Freezer", # pylint: disable=undefined-all-variable
"enumerate_active_agents", "enumerate_active_agents",
"get_bottle_backend", "get_bottle_backend",
"get_freezer", "get_freezer", # pylint: disable=undefined-all-variable
"has_backend", "has_backend",
"known_backend_names", "known_backend_names",
] ]