mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-04-07 08:03:40 +00:00
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. |
||
|---|---|---|
| .. | ||
| tibber_prices | ||