From 592b6858eb3c3444515834f9af4d6c7f36b6875a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 17 May 2026 16:39:54 +0000 Subject: [PATCH] style: auto-fix ruff warnings [skip ci] --- tests/test_tensors.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/test_tensors.py b/tests/test_tensors.py index eec479d..420b778 100644 --- a/tests/test_tensors.py +++ b/tests/test_tensors.py @@ -1165,9 +1165,9 @@ class TestValidateModelAvailable: def test_unknown_model_in_checkpoints_bucket(self, monkeypatch: pytest.MonkeyPatch) -> None: """Unknown model + fuzzy-match candidates — exits 1 with did-you-mean.""" - import typer # noqa: PLC0415 + import typer - from tensors import cli as cli_module # noqa: PLC0415 + from tensors import cli as cli_module monkeypatch.setattr( "tensors.comfyui.get_loaded_models", @@ -1185,9 +1185,9 @@ class TestValidateModelAvailable: def test_unknown_model_in_diffusion_models_bucket(self, monkeypatch: pytest.MonkeyPatch) -> None: """flux_unet family looks in diffusion_models/, not checkpoints/.""" - import typer # noqa: PLC0415 + import typer - from tensors import cli as cli_module # noqa: PLC0415 + from tensors import cli as cli_module monkeypatch.setattr( "tensors.comfyui.get_loaded_models", @@ -1204,7 +1204,7 @@ class TestValidateModelAvailable: def test_flux2_klein_uses_diffusion_models_bucket(self, monkeypatch: pytest.MonkeyPatch) -> None: """flux2_klein family also routes to diffusion_models/.""" - from tensors import cli as cli_module # noqa: PLC0415 + from tensors import cli as cli_module monkeypatch.setattr( "tensors.comfyui.get_loaded_models", @@ -1221,7 +1221,7 @@ class TestValidateModelAvailable: def test_present_model_passes_silently(self, monkeypatch: pytest.MonkeyPatch) -> None: """Happy path — model present, no exception.""" - from tensors import cli as cli_module # noqa: PLC0415 + from tensors import cli as cli_module monkeypatch.setattr( "tensors.comfyui.get_loaded_models", @@ -1235,9 +1235,9 @@ class TestValidateModelAvailable: def test_missing_lora_raises(self, monkeypatch: pytest.MonkeyPatch) -> None: """Model present but LoRA missing — exit 1.""" - import typer # noqa: PLC0415 + import typer - from tensors import cli as cli_module # noqa: PLC0415 + from tensors import cli as cli_module monkeypatch.setattr( "tensors.comfyui.get_loaded_models", @@ -1254,7 +1254,7 @@ class TestValidateModelAvailable: def test_network_failure_is_non_fatal(self, monkeypatch: pytest.MonkeyPatch) -> None: """If get_loaded_models() raises, validation falls through silently.""" - from tensors import cli as cli_module # noqa: PLC0415 + from tensors import cli as cli_module def _boom(console=None): raise ConnectionError("comfyui down") @@ -1265,9 +1265,9 @@ class TestValidateModelAvailable: def test_symlink_hint_when_file_in_wrong_bucket(self, monkeypatch: pytest.MonkeyPatch) -> None: """flux_unet checkpoint sitting in checkpoints/ → suggest symlinking.""" - import typer # noqa: PLC0415 + import typer - from tensors import cli as cli_module # noqa: PLC0415 + from tensors import cli as cli_module monkeypatch.setattr( "tensors.comfyui.get_loaded_models", @@ -1290,9 +1290,9 @@ class TestValidateModelAvailable: validator's flux_unet / flux2_klein bucket lookup would silently return an empty list. """ - import inspect # noqa: PLC0415 + import inspect - import tensors.comfyui as comfyui_module # noqa: PLC0415 + import tensors.comfyui as comfyui_module src = inspect.getsource(comfyui_module.get_loaded_models) assert '"diffusion_models"' in src