mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-05-28 18:43:40 +00:00
fix(tests): move LogCaptureFixture import under TYPE_CHECKING for better type hinting
This commit is contained in:
parent
ac7cd5b572
commit
c610dbe1a3
1 changed files with 4 additions and 1 deletions
|
|
@ -1,15 +1,18 @@
|
||||||
"""Tests for Bug #6: Rating threshold validation in calculate_rating_level()."""
|
"""Tests for Bug #6: Rating threshold validation in calculate_rating_level()."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from _pytest.logging import LogCaptureFixture
|
|
||||||
|
|
||||||
from custom_components.tibber_prices.utils.price import (
|
from custom_components.tibber_prices.utils.price import (
|
||||||
_apply_rating_gap_tolerance,
|
_apply_rating_gap_tolerance,
|
||||||
calculate_rating_level,
|
calculate_rating_level,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from _pytest.logging import LogCaptureFixture
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def caplog_debug(caplog: LogCaptureFixture) -> LogCaptureFixture:
|
def caplog_debug(caplog: LogCaptureFixture) -> LogCaptureFixture:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue