From c610dbe1a39457ce4ba35dec2f0440fd5bb10b2a Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Sat, 11 Apr 2026 11:05:55 +0000 Subject: [PATCH] fix(tests): move LogCaptureFixture import under TYPE_CHECKING for better type hinting --- tests/test_rating_threshold_validation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_rating_threshold_validation.py b/tests/test_rating_threshold_validation.py index c758e8c..0243a22 100644 --- a/tests/test_rating_threshold_validation.py +++ b/tests/test_rating_threshold_validation.py @@ -1,15 +1,18 @@ """Tests for Bug #6: Rating threshold validation in calculate_rating_level().""" import logging +from typing import TYPE_CHECKING import pytest -from _pytest.logging import LogCaptureFixture from custom_components.tibber_prices.utils.price import ( _apply_rating_gap_tolerance, calculate_rating_level, ) +if TYPE_CHECKING: + from _pytest.logging import LogCaptureFixture + @pytest.fixture def caplog_debug(caplog: LogCaptureFixture) -> LogCaptureFixture: