From 56d879f0b3fbbe34fbd99ddc3cef5535f546b7d9 Mon Sep 17 00:00:00 2001 From: didericis Date: Tue, 14 Jul 2026 17:12:12 -0400 Subject: [PATCH] =?UTF-8?q?fix(tests):=20pyright=20strict=20=E2=80=94=20ex?= =?UTF-8?q?port=20=5Fplan=20fixture,=20drop=20unused=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `tests/unit/_docker_bottle_plan.py`: add `__all__ = ["_plan"]` so the underscore-prefixed fixture isn't flagged reportUnusedFunction. - `tests/unit/test_egress_apply.py`: drop `SimpleNamespace` / `patch` imports left unused after the reload test became fail-closed. `pyright .` → 0 errors. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01WBMWTEtQdJ4W5UrWuLHCck --- tests/unit/_docker_bottle_plan.py | 4 ++++ tests/unit/test_egress_apply.py | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/_docker_bottle_plan.py b/tests/unit/_docker_bottle_plan.py index e2126af..6250f30 100644 --- a/tests/unit/_docker_bottle_plan.py +++ b/tests/unit/_docker_bottle_plan.py @@ -23,6 +23,10 @@ SLUG = "demo-abc12" STAGE = Path("/tmp/cb-stage") STATE = Path("/tmp/cb-state") +# Exported to consumers (e.g. test_consolidated_compose); named with a +# leading underscore for the historical fixture convention. +__all__ = ["_plan"] + def _manifest(*, supervise: bool, with_git: bool, with_egress: bool) -> ManifestIndex: """Minimal manifest with the toggles the matrix needs. The renderer diff --git a/tests/unit/test_egress_apply.py b/tests/unit/test_egress_apply.py index 68325b1..66ca42c 100644 --- a/tests/unit/test_egress_apply.py +++ b/tests/unit/test_egress_apply.py @@ -5,8 +5,6 @@ integration test).""" import tempfile import unittest from pathlib import Path -from types import SimpleNamespace -from unittest.mock import patch from tests.unit import use_bottle_root from bot_bottle.backend.egress_apply import EgressApplyError