Remove some unneeded pylint suppressions (#32152)

This commit is contained in:
Ville Skyttä 2020-02-25 02:47:15 +02:00 committed by GitHub
parent a9e061270b
commit 9b2544c923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 4 additions and 31 deletions

View File

@ -227,7 +227,6 @@ class AlexaCapability:
"""Return properties serialized for an API response."""
for prop in self.properties_supported():
prop_name = prop["name"]
# pylint: disable=assignment-from-no-return
prop_value = self.get_property(prop_name)
if prop_value is not None:
result = {

View File

@ -53,7 +53,7 @@ class AbstractConfig(ABC):
)
try:
await self._unsub_proactive_report
except Exception: # pylint: disable=broad-except
except Exception:
self._unsub_proactive_report = None
raise

View File

@ -87,7 +87,6 @@ class AlmondFlowHandler(config_entry_oauth2_flow.AbstractOAuth2FlowHandler):
)
return self.async_abort(reason="cannot_connect")
# pylint: disable=invalid-name
self.CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL
return self.async_create_entry(

View File

@ -109,7 +109,6 @@ CONFIG_SCHEMA = vol.Schema(
)
# pylint: disable=too-many-ancestors
class AmcrestChecker(Http):
"""amcrest.Http wrapper for catching errors."""

View File

@ -58,7 +58,6 @@ async def async_attach_trigger(hass, config, action, automation_info):
from_match = condition.zone(hass, zone_state, from_state)
to_match = condition.zone(hass, zone_state, to_state)
# pylint: disable=too-many-boolean-expressions
if (
trigger_event == EVENT_ENTER
and not from_match

View File

@ -53,7 +53,6 @@ async def async_attach_trigger(hass, config, action, automation_info):
from_match = False
to_match = condition.zone(hass, zone_state, to_s)
# pylint: disable=too-many-boolean-expressions
if (
event == EVENT_ENTER
and not from_match

View File

@ -411,7 +411,6 @@ class Device(RestoreEntity):
self.gps_accuracy = 0
LOGGER.warning("Could not parse gps value for %s: %s", self.dev_id, gps)
# pylint: disable=not-an-iterable
await self.async_update()
def stale(self, now: dt_util.dt.datetime = None):

View File

@ -60,10 +60,8 @@ class HueFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
if (
user_input is not None
and self.discovered_bridges is not None
# pylint: disable=unsupported-membership-test
and user_input["id"] in self.discovered_bridges
):
# pylint: disable=unsubscriptable-object
self.bridge = self.discovered_bridges[user_input["id"]]
await self.async_set_unique_id(self.bridge.id, raise_on_progress=False)
# We pass user input to link so it will attempt to link right away

View File

@ -141,7 +141,6 @@ async def _async_setup_entity(
async_add_entities([MqttFan(config, config_entry, discovery_hash)])
# pylint: disable=too-many-ancestors
class MqttFan(
MqttAttributes,
MqttAvailability,

View File

@ -154,7 +154,6 @@ async def async_setup_entity_basic(
async_add_entities([MqttLight(config, config_entry, discovery_hash)])
# pylint: disable=too-many-ancestors
class MqttLight(
MqttAttributes,
MqttAvailability,

View File

@ -125,7 +125,6 @@ async def async_setup_entity_json(
async_add_entities([MqttLightJson(config, config_entry, discovery_hash)])
# pylint: disable=too-many-ancestors
class MqttLightJson(
MqttAttributes,
MqttAvailability,

View File

@ -99,7 +99,6 @@ async def async_setup_entity_template(
async_add_entities([MqttTemplate(config, config_entry, discovery_hash)])
# pylint: disable=too-many-ancestors
class MqttTemplate(
MqttAttributes,
MqttAvailability,

View File

@ -99,7 +99,6 @@ async def _async_setup_entity(
async_add_entities([MqttSwitch(config, config_entry, discovery_hash)])
# pylint: disable=too-many-ancestors
class MqttSwitch(
MqttAttributes,
MqttAvailability,

View File

@ -168,7 +168,6 @@ async def async_setup_entity_legacy(
async_add_entities([MqttVacuum(config, config_entry, discovery_hash)])
# pylint: disable=too-many-ancestors
class MqttVacuum(
MqttAttributes,
MqttAvailability,

View File

@ -163,7 +163,6 @@ async def async_setup_entity_state(
async_add_entities([MqttStateVacuum(config, config_entry, discovery_hash)])
# pylint: disable=too-many-ancestors
class MqttStateVacuum(
MqttAttributes,
MqttAvailability,

View File

@ -228,8 +228,6 @@ class MySensorsLightRGB(MySensorsLight):
class MySensorsLightRGBW(MySensorsLightRGB):
"""RGBW child class to MySensorsLightRGB."""
# pylint: disable=too-many-ancestors
@property
def supported_features(self):
"""Flag supported features."""

View File

@ -115,7 +115,7 @@ async def async_setup(hass, config):
return call_data
service_disable_schema = vol.Schema( # pylint: disable=invalid-name
service_disable_schema = vol.Schema(
vol.All(
{
vol.Required(SERVICE_DISABLE_ATTR_DURATION): vol.All(

View File

@ -159,14 +159,12 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
hass.data[DATA_DEVICE_REGISTER][EVENT_KEY_COMMAND] = add_new_device
# pylint: disable=too-many-ancestors
class RflinkLight(SwitchableRflinkDevice, Light):
"""Representation of a Rflink light."""
pass
# pylint: disable=too-many-ancestors
class DimmableRflinkLight(SwitchableRflinkDevice, Light):
"""Rflink light device that support dimming."""
@ -212,7 +210,6 @@ class DimmableRflinkLight(SwitchableRflinkDevice, Light):
return SUPPORT_BRIGHTNESS
# pylint: disable=too-many-ancestors
class HybridRflinkLight(SwitchableRflinkDevice, Light):
"""Rflink light device that sends out both dim and on/off commands.
@ -276,7 +273,6 @@ class HybridRflinkLight(SwitchableRflinkDevice, Light):
return SUPPORT_BRIGHTNESS
# pylint: disable=too-many-ancestors
class ToggleRflinkLight(SwitchableRflinkDevice, Light):
"""Rflink light device which sends out only 'on' commands.

View File

@ -69,7 +69,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
async_add_entities(devices_from_config(config))
# pylint: disable=too-many-ancestors
class RflinkSwitch(SwitchableRflinkDevice, SwitchDevice):
"""Representation of a Rflink switch."""

View File

@ -12,10 +12,7 @@ if TYPE_CHECKING:
from .connection import ActiveConnection # noqa
WebSocketCommandHandler = Callable[
[HomeAssistant, "ActiveConnection", dict], None
] # pylint: disable=invalid-name
WebSocketCommandHandler = Callable[[HomeAssistant, "ActiveConnection", dict], None]
DOMAIN = "websocket_api"
URL = "/api/websocket"

View File

@ -30,7 +30,6 @@ if TYPE_CHECKING:
import homeassistant.components.zha.entity
import homeassistant.components.zha.core.channels
# pylint: disable=invalid-name
ChannelType = base_channels.ZigbeeChannel
ChannelsType = channels.Channels
ChannelPoolType = channels.ChannelPool

View File

@ -35,7 +35,7 @@ ChangeListener = Callable[
Optional[dict],
],
Awaitable[None],
] # pylint: disable=invalid-name
]
class CollectionError(HomeAssistantError):

View File

@ -41,7 +41,6 @@ def clear_secret_cache() -> None:
__SECRET_CACHE.clear()
# pylint: disable=too-many-ancestors
class SafeLineLoader(yaml.SafeLoader):
"""Loader class that keeps track of line numbers."""