hass.tibber_prices/custom_components
Julian Pawlowski 76baee7623 fix(coordinator): move timedelta import out of while loop
PLC0415 – suppress with noqa was already suppressing the warning, but the
import was still executed on every iteration of the while loop.  Standard
library imports belong at module level both for correctness and performance.

Move 'from datetime import timedelta' to the top-level import block and
remove the now-unnecessary 'noqa: PLC0415' comment.

Impact: Negligible per-call overhead removed.  More importantly, the code
no longer suppresses a linter warning that signals a real anti-pattern;
future static analysis runs will correctly flag any new inline imports.
2026-04-06 14:09:58 +00:00
..
tibber_prices fix(coordinator): move timedelta import out of while loop 2026-04-06 14:09:58 +00:00