mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Lint cleanups (#15243)
* Remove some unused imports * Fix a flake8 E271
This commit is contained in:
parent
9db8759317
commit
6f582dcf24
@ -10,10 +10,8 @@ from aiohttp.hdrs import AUTHORIZATION
|
|||||||
from aiohttp.web import Request, Response
|
from aiohttp.web import Request, Response
|
||||||
|
|
||||||
# Typing imports
|
# Typing imports
|
||||||
# pylint: disable=unused-import
|
|
||||||
from homeassistant.components.http import HomeAssistantView
|
from homeassistant.components.http import HomeAssistantView
|
||||||
from homeassistant.core import HomeAssistant, callback # NOQA
|
from homeassistant.core import callback
|
||||||
from homeassistant.helpers.entity import Entity # NOQA
|
|
||||||
|
|
||||||
from .const import (
|
from .const import (
|
||||||
GOOGLE_ASSISTANT_API_ENDPOINT,
|
GOOGLE_ASSISTANT_API_ENDPOINT,
|
||||||
|
@ -3,14 +3,6 @@ import collections
|
|||||||
from itertools import product
|
from itertools import product
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
# Typing imports
|
|
||||||
# pylint: disable=unused-import
|
|
||||||
# if False:
|
|
||||||
from aiohttp.web import Request, Response # NOQA
|
|
||||||
from typing import Dict, Tuple, Any, Optional # NOQA
|
|
||||||
from homeassistant.helpers.entity import Entity # NOQA
|
|
||||||
from homeassistant.core import HomeAssistant # NOQA
|
|
||||||
from homeassistant.util.unit_system import UnitSystem # NOQA
|
|
||||||
from homeassistant.util.decorator import Registry
|
from homeassistant.util.decorator import Registry
|
||||||
|
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
|
@ -123,7 +123,7 @@ class TibberSensor(Entity):
|
|||||||
async def _fetch_data(self):
|
async def _fetch_data(self):
|
||||||
try:
|
try:
|
||||||
await self._tibber_home.update_info()
|
await self._tibber_home.update_info()
|
||||||
await self._tibber_home.update_price_info()
|
await self._tibber_home.update_price_info()
|
||||||
except (asyncio.TimeoutError, aiohttp.ClientError):
|
except (asyncio.TimeoutError, aiohttp.ClientError):
|
||||||
return
|
return
|
||||||
data = self._tibber_home.info['viewer']['home']
|
data = self._tibber_home.info['viewer']['home']
|
||||||
|
@ -7,7 +7,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
# pylint: disable=unused-import
|
# pylint: disable=unused-import
|
||||||
from typing import Any, List, Tuple, Optional # NOQA
|
from typing import Any, Tuple, Optional # noqa: F401
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
from voluptuous.humanize import humanize_error
|
from voluptuous.humanize import humanize_error
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
"""Service calling related helpers."""
|
"""Service calling related helpers."""
|
||||||
import logging
|
import logging
|
||||||
# pylint: disable=unused-import
|
|
||||||
from typing import Optional # NOQA
|
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
"""Translation string lookup helpers."""
|
"""Translation string lookup helpers."""
|
||||||
import logging
|
import logging
|
||||||
# pylint: disable=unused-import
|
|
||||||
from typing import Optional # NOQA
|
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
|
@ -16,17 +16,11 @@ import logging
|
|||||||
import sys
|
import sys
|
||||||
from types import ModuleType
|
from types import ModuleType
|
||||||
|
|
||||||
# pylint: disable=unused-import
|
from typing import Optional, Set
|
||||||
from typing import Dict, List, Optional, Sequence, Set # NOQA
|
|
||||||
|
|
||||||
from homeassistant.const import PLATFORM_FORMAT
|
from homeassistant.const import PLATFORM_FORMAT
|
||||||
from homeassistant.util import OrderedSet
|
from homeassistant.util import OrderedSet
|
||||||
|
|
||||||
# Typing imports
|
|
||||||
# pylint: disable=using-constant-test,unused-import
|
|
||||||
if False:
|
|
||||||
from homeassistant.core import HomeAssistant # NOQA
|
|
||||||
|
|
||||||
PREPARED = False
|
PREPARED = False
|
||||||
|
|
||||||
DEPENDENCY_BLACKLIST = set(('config',))
|
DEPENDENCY_BLACKLIST = set(('config',))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user