Remove unnnecessary pylint configs from components/[a-d]* (#98911)
This commit is contained in:
parent
e471110288
commit
3b4774d9ed
32 changed files with 27 additions and 51 deletions
|
@ -30,7 +30,7 @@ async def async_setup_entry(
|
|||
data: AbodeSystem = hass.data[DOMAIN]
|
||||
|
||||
async_add_entities(
|
||||
AbodeCamera(data, device, TIMELINE.CAPTURE_IMAGE) # pylint: disable=no-member
|
||||
AbodeCamera(data, device, TIMELINE.CAPTURE_IMAGE)
|
||||
for device in data.abode.get_devices(generic_type=CONST.TYPE_CAMERA)
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
|||
import logging
|
||||
from typing import Any
|
||||
|
||||
from atenpdu import AtenPE, AtenPEError # pylint: disable=import-error
|
||||
from atenpdu import AtenPE, AtenPEError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.switch import (
|
||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
|
||||
from typing import Any
|
||||
|
||||
import avea # pylint: disable=import-error
|
||||
import avea
|
||||
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
|
|
|
@ -4,13 +4,13 @@ from __future__ import annotations
|
|||
import json
|
||||
import logging
|
||||
|
||||
# pylint: disable-next=import-error, no-name-in-module
|
||||
# pylint: disable-next=no-name-in-module
|
||||
from azure.servicebus import ServiceBusMessage
|
||||
|
||||
# pylint: disable-next=import-error, no-name-in-module
|
||||
# pylint: disable-next=no-name-in-module
|
||||
from azure.servicebus.aio import ServiceBusClient, ServiceBusSender
|
||||
|
||||
# pylint: disable-next=import-error, no-name-in-module
|
||||
# pylint: disable-next=no-name-in-module
|
||||
from azure.servicebus.exceptions import (
|
||||
MessagingEntityNotFoundError,
|
||||
ServiceBusConnectionError,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"""Platform for beewi_smartclim integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from beewi_smartclim import BeewiSmartClimPoller # pylint: disable=import-error
|
||||
from beewi_smartclim import BeewiSmartClimPoller
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
|
|
|
@ -49,7 +49,7 @@ def setup_platform(
|
|||
class BloomSkySensor(BinarySensorEntity):
|
||||
"""Representation of a single binary sensor in a BloomSky device."""
|
||||
|
||||
def __init__(self, bs, device, sensor_name): # pylint: disable=invalid-name
|
||||
def __init__(self, bs, device, sensor_name):
|
||||
"""Initialize a BloomSky binary sensor."""
|
||||
self._bloomsky = bs
|
||||
self._device_id = device["DeviceID"]
|
||||
|
|
|
@ -93,7 +93,7 @@ def setup_platform(
|
|||
class BloomSkySensor(SensorEntity):
|
||||
"""Representation of a single sensor in a BloomSky device."""
|
||||
|
||||
def __init__(self, bs, device, sensor_name): # pylint: disable=invalid-name
|
||||
def __init__(self, bs, device, sensor_name):
|
||||
"""Initialize a BloomSky sensor."""
|
||||
self._bloomsky = bs
|
||||
self._device_id = device["DeviceID"]
|
||||
|
|
|
@ -199,7 +199,7 @@ class HaBleakClientWrapper(BleakClient):
|
|||
when an integration does this.
|
||||
"""
|
||||
|
||||
def __init__( # pylint: disable=super-init-not-called, keyword-arg-before-vararg
|
||||
def __init__( # pylint: disable=super-init-not-called
|
||||
self,
|
||||
address_or_ble_device: str | BLEDevice,
|
||||
disconnected_callback: Callable[[BleakClient], None] | None = None,
|
||||
|
|
|
@ -7,7 +7,7 @@ from datetime import datetime, timedelta
|
|||
import logging
|
||||
from typing import Final
|
||||
|
||||
import bluetooth # pylint: disable=import-error
|
||||
import bluetooth
|
||||
from bt_proximity import BluetoothRSSI
|
||||
import voluptuous as vol
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@ SERVICE_BROWSE_URL = "browse_url"
|
|||
|
||||
SERVICE_BROWSE_URL_SCHEMA = vol.Schema(
|
||||
{
|
||||
# pylint: disable-next=no-value-for-parameter
|
||||
vol.Required(ATTR_URL, default=ATTR_URL_DEFAULT): vol.Url()
|
||||
vol.Required(ATTR_URL, default=ATTR_URL_DEFAULT): vol.Url(),
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ OFFSET = "!!"
|
|||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
{
|
||||
# pylint: disable=no-value-for-parameter
|
||||
vol.Required(CONF_URL): vol.Url(),
|
||||
vol.Optional(CONF_CALENDARS, default=[]): vol.All(cv.ensure_list, [cv.string]),
|
||||
vol.Inclusive(CONF_USERNAME, "authentication"): cv.string,
|
||||
|
|
|
@ -81,7 +81,7 @@ async def async_setup(hass: HomeAssistant, hass_config: ConfigType) -> bool:
|
|||
except UnidentifiedImageError as ex:
|
||||
_LOGGER.error(
|
||||
"Bad image from %s '%s' provided, are you sure it's an image? %s",
|
||||
image_type, # pylint: disable=used-before-assignment
|
||||
image_type,
|
||||
image_reference,
|
||||
ex,
|
||||
)
|
||||
|
|
|
@ -143,7 +143,6 @@ class ConfigManagerFlowIndexView(FlowManagerIndexView):
|
|||
)
|
||||
async def post(self, request):
|
||||
"""Handle a POST request."""
|
||||
# pylint: disable=no-value-for-parameter
|
||||
try:
|
||||
return await super().post(request)
|
||||
except DependencyError as exc:
|
||||
|
@ -175,7 +174,6 @@ class ConfigManagerFlowResourceView(FlowManagerResourceView):
|
|||
)
|
||||
async def post(self, request, flow_id):
|
||||
"""Handle a POST request."""
|
||||
# pylint: disable=no-value-for-parameter
|
||||
return await super().post(request, flow_id)
|
||||
|
||||
def _prepare_result_json(self, result):
|
||||
|
@ -212,7 +210,6 @@ class OptionManagerFlowIndexView(FlowManagerIndexView):
|
|||
|
||||
handler in request is entry_id.
|
||||
"""
|
||||
# pylint: disable=no-value-for-parameter
|
||||
return await super().post(request)
|
||||
|
||||
|
||||
|
@ -234,7 +231,6 @@ class OptionManagerFlowResourceView(FlowManagerResourceView):
|
|||
)
|
||||
async def post(self, request, flow_id):
|
||||
"""Handle a POST request."""
|
||||
# pylint: disable=no-value-for-parameter
|
||||
return await super().post(request, flow_id)
|
||||
|
||||
|
||||
|
|
|
@ -54,9 +54,7 @@ _DEFAULT_ERROR_TEXT = "Sorry, I couldn't understand that"
|
|||
_ENTITY_REGISTRY_UPDATE_FIELDS = ["aliases", "name", "original_name"]
|
||||
|
||||
REGEX_TYPE = type(re.compile(""))
|
||||
TRIGGER_CALLBACK_TYPE = Callable[ # pylint: disable=invalid-name
|
||||
[str, RecognizeResult], Awaitable[str | None]
|
||||
]
|
||||
TRIGGER_CALLBACK_TYPE = Callable[[str, RecognizeResult], Awaitable[str | None]]
|
||||
|
||||
|
||||
def json_load(fp: IO[str]) -> JsonObjectType:
|
||||
|
|
|
@ -8,8 +8,8 @@ import logging
|
|||
import time
|
||||
from typing import TYPE_CHECKING, Any, Concatenate, ParamSpec, TypeVar
|
||||
|
||||
from bluepy.btle import BTLEException # pylint: disable=import-error
|
||||
import decora # pylint: disable=import-error
|
||||
from bluepy.btle import BTLEException
|
||||
import decora
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import util
|
||||
|
|
|
@ -4,7 +4,6 @@ from __future__ import annotations
|
|||
import logging
|
||||
from typing import Any
|
||||
|
||||
# pylint: disable=import-error
|
||||
from decora_wifi import DecoraWiFiSession
|
||||
from decora_wifi.models.person import Person
|
||||
from decora_wifi.models.residence import Residence
|
||||
|
|
|
@ -106,7 +106,7 @@ class DemoLight(LightEntity):
|
|||
state: bool,
|
||||
available: bool = False,
|
||||
brightness: int = 180,
|
||||
ct: int | None = None, # pylint: disable=invalid-name
|
||||
ct: int | None = None,
|
||||
effect_list: list[str] | None = None,
|
||||
effect: str | None = None,
|
||||
hs_color: tuple[int, int] | None = None,
|
||||
|
|
|
@ -415,9 +415,7 @@ class DHCPWatcher(WatcherBase):
|
|||
"""Start watching for dhcp packets."""
|
||||
# Local import because importing from scapy has side effects such as opening
|
||||
# sockets
|
||||
from scapy import ( # pylint: disable=import-outside-toplevel,unused-import # noqa: F401
|
||||
arch,
|
||||
)
|
||||
from scapy import arch # pylint: disable=import-outside-toplevel # noqa: F401
|
||||
from scapy.layers.dhcp import DHCP # pylint: disable=import-outside-toplevel
|
||||
from scapy.layers.inet import IP # pylint: disable=import-outside-toplevel
|
||||
from scapy.layers.l2 import Ether # pylint: disable=import-outside-toplevel
|
||||
|
|
|
@ -65,7 +65,7 @@ class DigitalOceanBinarySensor(BinarySensorEntity):
|
|||
|
||||
_attr_attribution = ATTRIBUTION
|
||||
|
||||
def __init__(self, do, droplet_id): # pylint: disable=invalid-name
|
||||
def __init__(self, do, droplet_id):
|
||||
"""Initialize a new Digital Ocean sensor."""
|
||||
self._digital_ocean = do
|
||||
self._droplet_id = droplet_id
|
||||
|
|
|
@ -63,7 +63,7 @@ class DigitalOceanSwitch(SwitchEntity):
|
|||
|
||||
_attr_attribution = ATTRIBUTION
|
||||
|
||||
def __init__(self, do, droplet_id): # pylint: disable=invalid-name
|
||||
def __init__(self, do, droplet_id):
|
||||
"""Initialize a new Digital Ocean sensor."""
|
||||
self._digital_ocean = do
|
||||
self._droplet_id = droplet_id
|
||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
|
||||
import io
|
||||
|
||||
import face_recognition # pylint: disable=import-error
|
||||
import face_recognition
|
||||
|
||||
from homeassistant.components.image_processing import ImageProcessingFaceEntity
|
||||
from homeassistant.const import ATTR_LOCATION, CONF_ENTITY_ID, CONF_NAME, CONF_SOURCE
|
||||
|
@ -11,7 +11,6 @@ from homeassistant.core import HomeAssistant, split_entity_id
|
|||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
|
||||
# pylint: disable=unused-import
|
||||
from homeassistant.components.image_processing import ( # noqa: F401, isort:skip
|
||||
PLATFORM_SCHEMA,
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ from __future__ import annotations
|
|||
import io
|
||||
import logging
|
||||
|
||||
# pylint: disable=import-error
|
||||
import face_recognition
|
||||
import voluptuous as vol
|
||||
|
||||
|
|
|
@ -509,7 +509,7 @@ async def async_setup_entry(
|
|||
if stop_listener and (
|
||||
hass.state == CoreState.not_running or hass.is_running
|
||||
):
|
||||
stop_listener() # pylint: disable=not-callable
|
||||
stop_listener()
|
||||
|
||||
if transport:
|
||||
transport.close()
|
||||
|
|
|
@ -138,6 +138,6 @@ def async_track_time_interval_backoff(
|
|||
def remove_listener() -> None:
|
||||
"""Remove interval listener."""
|
||||
if remove:
|
||||
remove() # pylint: disable=not-callable
|
||||
remove()
|
||||
|
||||
return remove_listener
|
||||
|
|
|
@ -14,7 +14,6 @@ SESSION_ID = "amzn1.echo-api.session.0000000-0000-0000-0000-00000000000"
|
|||
APPLICATION_ID = "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
|
||||
REQUEST_ID = "amzn1.echo-api.request.0000000-0000-0000-0000-00000000000"
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
calls = []
|
||||
|
||||
NPR_NEWS_MP3_URL = "https://pd.npr.org/anon.npr-mp3/npr/news/newscast.mp3"
|
||||
|
|
|
@ -19,7 +19,6 @@ REQUEST_ID = "amzn1.echo-api.request.0000000-0000-0000-0000-00000000000"
|
|||
AUTHORITY_ID = "amzn1.er-authority.000000-d0ed-0000-ad00-000000d00ebe.ZODIAC"
|
||||
BUILTIN_AUTH_ID = "amzn1.er-authority.000000-d0ed-0000-ad00-000000d00ebe.TEST"
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
calls = []
|
||||
|
||||
NPR_NEWS_MP3_URL = "https://pd.npr.org/anon.npr-mp3/npr/news/newscast.mp3"
|
||||
|
|
|
@ -81,7 +81,6 @@ async def test_api_state_change(
|
|||
assert hass.states.get("test.test").state == "debug_state_change2"
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_api_state_change_of_non_existing_entity(
|
||||
hass: HomeAssistant, mock_api_client: TestClient
|
||||
) -> None:
|
||||
|
@ -97,7 +96,6 @@ async def test_api_state_change_of_non_existing_entity(
|
|||
assert hass.states.get("test_entity.that_does_not_exist").state == new_state
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_api_state_change_with_bad_data(
|
||||
hass: HomeAssistant, mock_api_client: TestClient
|
||||
) -> None:
|
||||
|
@ -109,7 +107,6 @@ async def test_api_state_change_with_bad_data(
|
|||
assert resp.status == HTTPStatus.BAD_REQUEST
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_api_state_change_to_zero_value(
|
||||
hass: HomeAssistant, mock_api_client: TestClient
|
||||
) -> None:
|
||||
|
@ -127,7 +124,6 @@ async def test_api_state_change_to_zero_value(
|
|||
assert resp.status == HTTPStatus.OK
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_api_state_change_push(
|
||||
hass: HomeAssistant, mock_api_client: TestClient
|
||||
) -> None:
|
||||
|
@ -154,7 +150,6 @@ async def test_api_state_change_push(
|
|||
assert len(events) == 1
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_api_fire_event_with_no_data(
|
||||
hass: HomeAssistant, mock_api_client: TestClient
|
||||
) -> None:
|
||||
|
@ -174,7 +169,6 @@ async def test_api_fire_event_with_no_data(
|
|||
assert len(test_value) == 1
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_api_fire_event_with_data(
|
||||
hass: HomeAssistant, mock_api_client: TestClient
|
||||
) -> None:
|
||||
|
@ -199,7 +193,6 @@ async def test_api_fire_event_with_data(
|
|||
assert len(test_value) == 1
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_api_fire_event_with_invalid_json(
|
||||
hass: HomeAssistant, mock_api_client: TestClient
|
||||
) -> None:
|
||||
|
|
|
@ -228,9 +228,9 @@ async def test_sound_mode_list(player, state, modes, modes_enum) -> None:
|
|||
async def test_is_volume_muted(player, state) -> None:
|
||||
"""Test muted."""
|
||||
state.get_mute.return_value = True
|
||||
assert player.is_volume_muted is True # pylint: disable=singleton-comparison
|
||||
assert player.is_volume_muted is True
|
||||
state.get_mute.return_value = False
|
||||
assert player.is_volume_muted is False # pylint: disable=singleton-comparison
|
||||
assert player.is_volume_muted is False
|
||||
state.get_mute.return_value = None
|
||||
assert player.is_volume_muted is None
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ from tests.common import MockConfigEntry, MockPlatform, mock_entity_platform
|
|||
class SelectPlatform(MockPlatform):
|
||||
"""Fake select platform."""
|
||||
|
||||
# pylint: disable=method-hidden
|
||||
async def async_setup_entry(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
|
|
|
@ -29,7 +29,7 @@ def client_fixture() -> Generator[MagicMock, None, None]:
|
|||
client = mock_balboa.return_value
|
||||
callback: list[Callable] = []
|
||||
|
||||
def on(_, _callback: Callable): # pylint: disable=invalid-name
|
||||
def on(_, _callback: Callable):
|
||||
callback.append(_callback)
|
||||
return lambda: None
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ from tests.components.media_player import common
|
|||
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||
from tests.typing import WebSocketGenerator
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
FakeUUID = UUID("57355bce-9364-4aa6-ac1e-eb849dccf9e2")
|
||||
FakeUUID2 = UUID("57355bce-9364-4aa6-ac1e-eb849dccf9e4")
|
||||
FakeGroupUUID = UUID("57355bce-9364-4aa6-ac1e-eb849dccf9e3")
|
||||
|
|
|
@ -4,7 +4,7 @@ import threading
|
|||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from scapy import arch # pylint: disable=unused-import # noqa: F401
|
||||
from scapy import arch # noqa: F401
|
||||
from scapy.error import Scapy_Exception
|
||||
from scapy.layers.dhcp import DHCP
|
||||
from scapy.layers.l2 import Ether
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue