Remove nzbget from mypy ignore list (#75158)
parent
3bccac9949
commit
51c17197c5
|
@ -1,6 +1,8 @@
|
||||||
"""Provides the NZBGet DataUpdateCoordinator."""
|
"""Provides the NZBGet DataUpdateCoordinator."""
|
||||||
|
from collections.abc import Mapping
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from async_timeout import timeout
|
from async_timeout import timeout
|
||||||
from pynzbgetapi import NZBGetAPI, NZBGetAPIException
|
from pynzbgetapi import NZBGetAPI, NZBGetAPIException
|
||||||
|
@ -25,7 +27,13 @@ _LOGGER = logging.getLogger(__name__)
|
||||||
class NZBGetDataUpdateCoordinator(DataUpdateCoordinator):
|
class NZBGetDataUpdateCoordinator(DataUpdateCoordinator):
|
||||||
"""Class to manage fetching NZBGet data."""
|
"""Class to manage fetching NZBGet data."""
|
||||||
|
|
||||||
def __init__(self, hass: HomeAssistant, *, config: dict, options: dict) -> None:
|
def __init__(
|
||||||
|
self,
|
||||||
|
hass: HomeAssistant,
|
||||||
|
*,
|
||||||
|
config: Mapping[str, Any],
|
||||||
|
options: Mapping[str, Any],
|
||||||
|
) -> None:
|
||||||
"""Initialize global NZBGet data updater."""
|
"""Initialize global NZBGet data updater."""
|
||||||
self.nzbget = NZBGetAPI(
|
self.nzbget = NZBGetAPI(
|
||||||
config[CONF_HOST],
|
config[CONF_HOST],
|
||||||
|
@ -37,7 +45,7 @@ class NZBGetDataUpdateCoordinator(DataUpdateCoordinator):
|
||||||
)
|
)
|
||||||
|
|
||||||
self._completed_downloads_init = False
|
self._completed_downloads_init = False
|
||||||
self._completed_downloads = {}
|
self._completed_downloads = set[tuple]()
|
||||||
|
|
||||||
update_interval = timedelta(seconds=options[CONF_SCAN_INTERVAL])
|
update_interval = timedelta(seconds=options[CONF_SCAN_INTERVAL])
|
||||||
|
|
||||||
|
|
12
mypy.ini
12
mypy.ini
|
@ -2689,18 +2689,6 @@ ignore_errors = true
|
||||||
[mypy-homeassistant.components.minecraft_server.sensor]
|
[mypy-homeassistant.components.minecraft_server.sensor]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
[mypy-homeassistant.components.nzbget]
|
|
||||||
ignore_errors = true
|
|
||||||
|
|
||||||
[mypy-homeassistant.components.nzbget.config_flow]
|
|
||||||
ignore_errors = true
|
|
||||||
|
|
||||||
[mypy-homeassistant.components.nzbget.coordinator]
|
|
||||||
ignore_errors = true
|
|
||||||
|
|
||||||
[mypy-homeassistant.components.nzbget.switch]
|
|
||||||
ignore_errors = true
|
|
||||||
|
|
||||||
[mypy-homeassistant.components.onvif.base]
|
[mypy-homeassistant.components.onvif.base]
|
||||||
ignore_errors = true
|
ignore_errors = true
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,6 @@ IGNORED_MODULES: Final[list[str]] = [
|
||||||
"homeassistant.components.minecraft_server",
|
"homeassistant.components.minecraft_server",
|
||||||
"homeassistant.components.minecraft_server.helpers",
|
"homeassistant.components.minecraft_server.helpers",
|
||||||
"homeassistant.components.minecraft_server.sensor",
|
"homeassistant.components.minecraft_server.sensor",
|
||||||
"homeassistant.components.nzbget",
|
|
||||||
"homeassistant.components.nzbget.config_flow",
|
|
||||||
"homeassistant.components.nzbget.coordinator",
|
|
||||||
"homeassistant.components.nzbget.switch",
|
|
||||||
"homeassistant.components.onvif.base",
|
"homeassistant.components.onvif.base",
|
||||||
"homeassistant.components.onvif.binary_sensor",
|
"homeassistant.components.onvif.binary_sensor",
|
||||||
"homeassistant.components.onvif.camera",
|
"homeassistant.components.onvif.camera",
|
||||||
|
|
Loading…
Reference in New Issue