Enable pylint unnecessary-pass (#33650)

* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
This commit is contained in:
Franck Nijhof 2020-04-05 10:33:07 +02:00 committed by GitHub
parent 000ad256fb
commit 7653dc947a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
79 changed files with 0 additions and 349 deletions

View File

@ -116,7 +116,6 @@ class AuthProvider:
async def async_initialize(self) -> None: async def async_initialize(self) -> None:
"""Initialize the auth provider.""" """Initialize the auth provider."""
pass
async def auth_provider_from_config( async def auth_provider_from_config(

View File

@ -30,10 +30,6 @@ class AdGuardHomeFlowHandler(ConfigFlow):
_hassio_discovery = None _hassio_discovery = None
def __init__(self):
"""Initialize AgGuard Home flow."""
pass
async def _show_setup_form(self, errors=None): async def _show_setup_form(self, errors=None):
"""Show the setup form to the user.""" """Show the setup form to the user."""
return self.async_show_form( return self.async_show_form(

View File

@ -252,7 +252,6 @@ class AlexaEntity:
Raises _UnsupportedInterface. Raises _UnsupportedInterface.
""" """
pass
def interfaces(self): def interfaces(self):
"""Return a list of supported interfaces. """Return a list of supported interfaces.

View File

@ -90,21 +90,16 @@ async def fetch_redirect_uris(hass, url):
except asyncio.TimeoutError: except asyncio.TimeoutError:
_LOGGER.error("Timeout while looking up redirect_uri %s", url) _LOGGER.error("Timeout while looking up redirect_uri %s", url)
pass
except aiohttp.client_exceptions.ClientSSLError: except aiohttp.client_exceptions.ClientSSLError:
_LOGGER.error("SSL error while looking up redirect_uri %s", url) _LOGGER.error("SSL error while looking up redirect_uri %s", url)
pass
except aiohttp.client_exceptions.ClientOSError as ex: except aiohttp.client_exceptions.ClientOSError as ex:
_LOGGER.error("OS error while looking up redirect_uri %s: %s", url, ex.strerror) _LOGGER.error("OS error while looking up redirect_uri %s: %s", url, ex.strerror)
pass
except aiohttp.client_exceptions.ClientConnectionError: except aiohttp.client_exceptions.ClientConnectionError:
_LOGGER.error( _LOGGER.error(
"Low level connection error while looking up redirect_uri %s", url "Low level connection error while looking up redirect_uri %s", url
) )
pass
except aiohttp.client_exceptions.ClientError: except aiohttp.client_exceptions.ClientError:
_LOGGER.error("Unknown error while looking up redirect_uri %s", url) _LOGGER.error("Unknown error while looking up redirect_uri %s", url)
pass
# Authorization endpoints verifying that a redirect_uri is allowed for use # Authorization endpoints verifying that a redirect_uri is allowed for use
# by a client MUST look for an exact match of the given redirect_uri in the # by a client MUST look for an exact match of the given redirect_uri in the

View File

@ -173,7 +173,6 @@ class CastStatusListener:
@staticmethod @staticmethod
def added_to_multizone(group_uuid): def added_to_multizone(group_uuid):
"""Handle the cast added to a group.""" """Handle the cast added to a group."""
pass
def removed_from_multizone(self, group_uuid): def removed_from_multizone(self, group_uuid):
"""Handle the cast removed from a group.""" """Handle the cast removed from a group."""
@ -182,7 +181,6 @@ class CastStatusListener:
def multizone_new_cast_status(self, group_uuid, cast_status): def multizone_new_cast_status(self, group_uuid, cast_status):
"""Handle reception of a new CastStatus for a group.""" """Handle reception of a new CastStatus for a group."""
pass
def multizone_new_media_status(self, group_uuid, media_status): def multizone_new_media_status(self, group_uuid, media_status):
"""Handle reception of a new MediaStatus for a group.""" """Handle reception of a new MediaStatus for a group."""
@ -224,7 +222,6 @@ class DynamicGroupCastStatusListener:
def new_cast_status(self, cast_status): def new_cast_status(self, cast_status):
"""Handle reception of a new CastStatus.""" """Handle reception of a new CastStatus."""
pass
def new_media_status(self, media_status): def new_media_status(self, media_status):
"""Handle reception of a new MediaStatus.""" """Handle reception of a new MediaStatus."""

View File

@ -125,8 +125,6 @@ STATIONS_RESPONSE_SCHEMA = vol.Schema(
class CityBikesRequestError(Exception): class CityBikesRequestError(Exception):
"""Error to indicate a CityBikes API request has failed.""" """Error to indicate a CityBikes API request has failed."""
pass
async def async_citybikes_request(hass, uri, schema): async def async_citybikes_request(hass, uri, schema):
"""Perform a request to CityBikes API endpoint, and parse the response.""" """Perform a request to CityBikes API endpoint, and parse the response."""

View File

@ -162,7 +162,6 @@ class CoverDevice(Entity):
None is unknown, 0 is closed, 100 is fully open. None is unknown, 0 is closed, 100 is fully open.
""" """
pass
@property @property
def current_cover_tilt_position(self): def current_cover_tilt_position(self):
@ -170,7 +169,6 @@ class CoverDevice(Entity):
None is unknown, 0 is closed, 100 is fully open. None is unknown, 0 is closed, 100 is fully open.
""" """
pass
@property @property
def state(self): def state(self):
@ -223,12 +221,10 @@ class CoverDevice(Entity):
@property @property
def is_opening(self): def is_opening(self):
"""Return if the cover is opening or not.""" """Return if the cover is opening or not."""
pass
@property @property
def is_closing(self): def is_closing(self):
"""Return if the cover is closing or not.""" """Return if the cover is closing or not."""
pass
@property @property
def is_closed(self): def is_closed(self):
@ -267,7 +263,6 @@ class CoverDevice(Entity):
def set_cover_position(self, **kwargs): def set_cover_position(self, **kwargs):
"""Move the cover to a specific position.""" """Move the cover to a specific position."""
pass
async def async_set_cover_position(self, **kwargs): async def async_set_cover_position(self, **kwargs):
"""Move the cover to a specific position.""" """Move the cover to a specific position."""
@ -275,7 +270,6 @@ class CoverDevice(Entity):
def stop_cover(self, **kwargs): def stop_cover(self, **kwargs):
"""Stop the cover.""" """Stop the cover."""
pass
async def async_stop_cover(self, **kwargs): async def async_stop_cover(self, **kwargs):
"""Stop the cover.""" """Stop the cover."""
@ -283,7 +277,6 @@ class CoverDevice(Entity):
def open_cover_tilt(self, **kwargs: Any) -> None: def open_cover_tilt(self, **kwargs: Any) -> None:
"""Open the cover tilt.""" """Open the cover tilt."""
pass
async def async_open_cover_tilt(self, **kwargs): async def async_open_cover_tilt(self, **kwargs):
"""Open the cover tilt.""" """Open the cover tilt."""
@ -291,7 +284,6 @@ class CoverDevice(Entity):
def close_cover_tilt(self, **kwargs: Any) -> None: def close_cover_tilt(self, **kwargs: Any) -> None:
"""Close the cover tilt.""" """Close the cover tilt."""
pass
async def async_close_cover_tilt(self, **kwargs): async def async_close_cover_tilt(self, **kwargs):
"""Close the cover tilt.""" """Close the cover tilt."""
@ -299,7 +291,6 @@ class CoverDevice(Entity):
def set_cover_tilt_position(self, **kwargs): def set_cover_tilt_position(self, **kwargs):
"""Move the cover tilt to a specific position.""" """Move the cover tilt to a specific position."""
pass
async def async_set_cover_tilt_position(self, **kwargs): async def async_set_cover_tilt_position(self, **kwargs):
"""Move the cover tilt to a specific position.""" """Move the cover tilt to a specific position."""
@ -309,7 +300,6 @@ class CoverDevice(Entity):
def stop_cover_tilt(self, **kwargs): def stop_cover_tilt(self, **kwargs):
"""Stop the cover.""" """Stop the cover."""
pass
async def async_stop_cover_tilt(self, **kwargs): async def async_stop_cover_tilt(self, **kwargs):
"""Stop the cover.""" """Stop the cover."""

View File

@ -78,7 +78,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
Can only be called when a user accidentally mentions the platform in their Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored. config. But even in that case it would have been ignored.
""" """
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):

View File

@ -22,7 +22,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
Can only be called when a user accidentally mentions the platform in their Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored. config. But even in that case it would have been ignored.
""" """
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):

View File

@ -16,7 +16,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
Can only be called when a user accidentally mentions the platform in their Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored. config. But even in that case it would have been ignored.
""" """
pass
async def async_setup_entry(hass, entry, async_add_entities): async def async_setup_entry(hass, entry, async_add_entities):

View File

@ -141,7 +141,6 @@ class FanEntity(ToggleEntity):
def oscillate(self, oscillating: bool) -> None: def oscillate(self, oscillating: bool) -> None:
"""Oscillate the fan.""" """Oscillate the fan."""
pass
async def async_oscillate(self, oscillating: bool): async def async_oscillate(self, oscillating: bool):
"""Oscillate the fan.""" """Oscillate the fan."""

View File

@ -462,10 +462,6 @@ class FibaroDevice(Entity):
"""Get polling requirement from fibaro device.""" """Get polling requirement from fibaro device."""
return False return False
def update(self):
"""Call to update state."""
pass
@property @property
def device_state_attributes(self): def device_state_attributes(self):
"""Return the state attributes of the device.""" """Return the state attributes of the device."""

View File

@ -186,7 +186,6 @@ class FroniusAdapter:
async def _update(self): async def _update(self):
"""Return values of interest.""" """Return values of interest."""
pass
async def register(self, sensor): async def register(self, sensor):
"""Register child sensor for update subscriptions.""" """Register child sensor for update subscriptions."""

View File

@ -421,11 +421,9 @@ class IndexView(web_urldispatcher.AbstractResource):
def freeze(self) -> None: def freeze(self) -> None:
"""Freeze the resource.""" """Freeze the resource."""
pass
def raw_match(self, path: str) -> bool: def raw_match(self, path: str) -> bool:
"""Perform a raw match against path.""" """Perform a raw match against path."""
pass
def get_template(self): def get_template(self):
"""Get template.""" """Get template."""

View File

@ -235,7 +235,6 @@ class HomeBridge(Bridge):
def setup_message(self): def setup_message(self):
"""Prevent print of pyhap setup message to terminal.""" """Prevent print of pyhap setup message to terminal."""
pass
class HomeDriver(AccessoryDriver): class HomeDriver(AccessoryDriver):

View File

@ -600,7 +600,6 @@ class HuaweiLteBaseEntity(Entity):
async def async_update_options(self, config_entry: ConfigEntry) -> None: async def async_update_options(self, config_entry: ConfigEntry) -> None:
"""Update config entry options.""" """Update config entry options."""
pass
async def async_added_to_hass(self) -> None: async def async_added_to_hass(self) -> None:
"""Connect to update signals.""" """Connect to update signals."""

View File

@ -68,7 +68,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
Can only be called when a user accidentally mentions hue platform in their Can only be called when a user accidentally mentions hue platform in their
config. But even in that case it would have been ignored. config. But even in that case it would have been ignored.
""" """
pass
def create_light(item_class, coordinator, bridge, is_group, api, item_id): def create_light(item_class, coordinator, bridge, is_group, api, item_id):

View File

@ -24,7 +24,6 @@ async def async_setup_scanner(
hass: HomeAssistantType, config, see, discovery_info=None hass: HomeAssistantType, config, see, discovery_info=None
): ):
"""Old way of setting up the iCloud tracker.""" """Old way of setting up the iCloud tracker."""
pass
async def async_setup_entry( async def async_setup_entry(

View File

@ -90,4 +90,3 @@ class InComfortClimate(IncomfortChild, ClimateDevice):
async def async_set_hvac_mode(self, hvac_mode: str) -> None: async def async_set_hvac_mode(self, hvac_mode: str) -> None:
"""Set new target hvac mode.""" """Set new target hvac mode."""
pass

View File

@ -319,7 +319,6 @@ class ISYBinarySensorHeartbeat(ISYDevice, BinarySensorDevice):
We listen directly to the Control events for this device. We listen directly to the Control events for this device.
""" """
pass
@property @property
def value(self) -> object: def value(self) -> object:

View File

@ -177,8 +177,6 @@ class Mailbox:
class StreamError(Exception): class StreamError(Exception):
"""Media streaming exception.""" """Media streaming exception."""
pass
class MailboxView(HomeAssistantView): class MailboxView(HomeAssistantView):
"""Base mailbox view.""" """Base mailbox view."""

View File

@ -58,14 +58,10 @@ def setup(hass, config):
class MEDownloadException(Exception): class MEDownloadException(Exception):
"""Media extractor download exception.""" """Media extractor download exception."""
pass
class MEQueryException(Exception): class MEQueryException(Exception):
"""Media extractor query exception.""" """Media extractor query exception."""
pass
class MediaExtractor: class MediaExtractor:
"""Class which encapsulates all extraction logic.""" """Class which encapsulates all extraction logic."""

View File

@ -56,8 +56,6 @@ def set_discovery_hash(hass, discovery_hash):
class MQTTConfig(dict): class MQTTConfig(dict):
"""Dummy class to allow adding attributes.""" """Dummy class to allow adding attributes."""
pass
async def async_start( async def async_start(
hass: HomeAssistantType, discovery_topic, hass_config, config_entry=None hass: HomeAssistantType, discovery_topic, hass_config, config_entry=None

View File

@ -35,10 +35,6 @@ class OpenUvFlowHandler(config_entries.ConfigFlow):
VERSION = 2 VERSION = 2
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
def __init__(self):
"""Initialize the config flow."""
pass
async def _show_form(self, errors=None): async def _show_form(self, errors=None):
"""Show the form to the user.""" """Show the form to the user."""
data_schema = vol.Schema( data_schema = vol.Schema(

View File

@ -42,14 +42,6 @@ from .const import (
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Plex media_player platform.
Deprecated.
"""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Plex media_player from a config entry.""" """Set up Plex media_player from a config entry."""
server_id = config_entry.data[CONF_SERVER_IDENTIFIER] server_id = config_entry.data[CONF_SERVER_IDENTIFIER]

View File

@ -17,14 +17,6 @@ from .const import (
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the Plex sensor platform.
Deprecated.
"""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up Plex sensor from a config entry.""" """Set up Plex sensor from a config entry."""
server_id = config_entry.data[CONF_SERVER_IDENTIFIER] server_id = config_entry.data[CONF_SERVER_IDENTIFIER]

View File

@ -271,7 +271,6 @@ class MinutPointEntity(Entity):
async def _update_callback(self): async def _update_callback(self):
"""Update the value of the sensor.""" """Update the value of the sensor."""
pass
@property @property
def available(self): def available(self):

View File

@ -72,8 +72,6 @@ ALLOWED_DT_UTIL = {
class ScriptError(HomeAssistantError): class ScriptError(HomeAssistantError):
"""When a script error occurs.""" """When a script error occurs."""
pass
def setup(hass, config): def setup(hass, config):
"""Initialize the Python script component.""" """Initialize the Python script component."""
@ -216,7 +214,6 @@ class StubPrinter:
def __init__(self, _getattr_): def __init__(self, _getattr_):
"""Initialize our printer.""" """Initialize our printer."""
pass
def _call_print(self, *objects, **kwargs): def _call_print(self, *objects, **kwargs):
"""Print text.""" """Print text."""

View File

@ -162,8 +162,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
class RflinkLight(SwitchableRflinkDevice, Light): class RflinkLight(SwitchableRflinkDevice, Light):
"""Representation of a Rflink light.""" """Representation of a Rflink light."""
pass
class DimmableRflinkLight(SwitchableRflinkDevice, Light): class DimmableRflinkLight(SwitchableRflinkDevice, Light):
"""Rflink light device that support dimming.""" """Rflink light device that support dimming."""

View File

@ -71,5 +71,3 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
class RflinkSwitch(SwitchableRflinkDevice, SwitchDevice): class RflinkSwitch(SwitchableRflinkDevice, SwitchDevice):
"""Representation of a Rflink switch.""" """Representation of a Rflink switch."""
pass

View File

@ -68,7 +68,6 @@ class RokuDevice(MediaPlayerDevice):
self._available = True self._available = True
except (RequestsConnectionError, RequestsReadTimeout, RokuException): except (RequestsConnectionError, RequestsReadTimeout, RokuException):
self._available = False self._available = False
pass
def get_source_list(self): def get_source_list(self):
"""Get the list of applications to be used as sources.""" """Get the list of applications to be used as sources."""

View File

@ -43,7 +43,6 @@ class RokuRemote(RemoteDevice):
self._available = True self._available = True
except (RequestsConnectionError, RequestsReadTimeout, RokuException): except (RequestsConnectionError, RequestsReadTimeout, RokuException):
self._available = False self._available = False
pass
@property @property
def name(self): def name(self):

View File

@ -52,13 +52,6 @@ SUPPORT_SAMSUNGTV = (
) )
async def async_setup_platform(
hass, config, add_entities, discovery_info=None
): # pragma: no cover
"""Set up the Samsung TV platform."""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up the Samsung TV from a config entry.""" """Set up the Samsung TV from a config entry."""
ip_address = config_entry.data[CONF_IP_ADDRESS] ip_address = config_entry.data[CONF_IP_ADDRESS]

View File

@ -683,7 +683,6 @@ class SimpliSafeEntity(Entity):
@callback @callback
def async_update_from_rest_api(self): def async_update_from_rest_api(self):
"""Update the entity with the provided REST API data.""" """Update the entity with the provided REST API data."""
pass
@callback @callback
def _async_internal_update_from_websocket_event(self, event): def _async_internal_update_from_websocket_event(self, event):
@ -707,7 +706,6 @@ class SimpliSafeEntity(Entity):
@callback @callback
def async_update_from_websocket_event(self, event): def async_update_from_websocket_event(self, event):
"""Update the entity with the provided websocket API data.""" """Update the entity with the provided websocket API data."""
pass
async def async_will_remove_from_hass(self) -> None: async def async_will_remove_from_hass(self) -> None:
"""Disconnect dispatcher listener when removed.""" """Disconnect dispatcher listener when removed."""

View File

@ -51,15 +51,6 @@ RETRY_TIMEOUT = 5 * 60
MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=31) MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=31)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up components.
Can only be called when a user accidentally mentions smhi in the
config. In that case it will be ignored.
"""
pass
async def async_setup_entry( async def async_setup_entry(
hass: HomeAssistant, config_entry: ConfigEntry, config_entries hass: HomeAssistant, config_entry: ConfigEntry, config_entries
) -> bool: ) -> bool:

View File

@ -18,15 +18,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
) )
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up platform.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""
pass
class SomaCover(SomaEntity, CoverDevice): class SomaCover(SomaEntity, CoverDevice):
"""Representation of a Soma cover device.""" """Representation of a Soma cover device."""

View File

@ -61,7 +61,6 @@ class StarlineAccount:
) )
except Exception as err: # pylint: disable=broad-except except Exception as err: # pylint: disable=broad-except
LOGGER.error("Error updating SLNet token: %s", err) LOGGER.error("Error updating SLNet token: %s", err)
pass
def _update_data(self): def _update_data(self):
"""Update StarLine data.""" """Update StarLine data."""

View File

@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up TelldusLive.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up tellduslive sensors dynamically.""" """Set up tellduslive sensors dynamically."""

View File

@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up TelldusLive.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up tellduslive sensors dynamically.""" """Set up tellduslive sensors dynamically."""

View File

@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up TelldusLive.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up tellduslive sensors dynamically.""" """Set up tellduslive sensors dynamically."""

View File

@ -52,15 +52,6 @@ SENSOR_TYPES = {
} }
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up TelldusLive.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up tellduslive sensors dynamically.""" """Set up tellduslive sensors dynamically."""

View File

@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Old way of setting up TelldusLive.
Can only be called when a user accidentally mentions the platform in their
config. But even in that case it would have been ignored.
"""
pass
async def async_setup_entry(hass, config_entry, async_add_entities): async def async_setup_entry(hass, config_entry, async_add_entities):
"""Set up tellduslive sensors dynamically.""" """Set up tellduslive sensors dynamically."""

View File

@ -55,12 +55,9 @@ class TellstickCover(TellstickDevice, CoverDevice):
def _parse_tellcore_data(self, tellcore_data): def _parse_tellcore_data(self, tellcore_data):
"""Turn the value received from tellcore into something useful.""" """Turn the value received from tellcore into something useful."""
pass
def _parse_ha_data(self, kwargs): def _parse_ha_data(self, kwargs):
"""Turn the value from HA into something useful.""" """Turn the value from HA into something useful."""
pass
def _update_model(self, new_state, data): def _update_model(self, new_state, data):
"""Update the device entity state to match the arguments.""" """Update the device entity state to match the arguments."""
pass

View File

@ -34,11 +34,9 @@ class TellstickSwitch(TellstickDevice, ToggleEntity):
def _parse_ha_data(self, kwargs): def _parse_ha_data(self, kwargs):
"""Turn the value from HA into something useful.""" """Turn the value from HA into something useful."""
pass
def _parse_tellcore_data(self, tellcore_data): def _parse_tellcore_data(self, tellcore_data):
"""Turn the value received from tellcore into something useful.""" """Turn the value received from tellcore into something useful."""
pass
def _update_model(self, new_state, data): def _update_model(self, new_state, data):
"""Update the device entity state to match the arguments.""" """Update the device entity state to match the arguments."""

View File

@ -250,11 +250,9 @@ class TeslaDevice(Entity):
async def async_added_to_hass(self): async def async_added_to_hass(self):
"""Register state update callback.""" """Register state update callback."""
pass
async def async_will_remove_from_hass(self): async def async_will_remove_from_hass(self):
"""Prepare for unload.""" """Prepare for unload."""
pass
async def async_update(self): async def async_update(self):
"""Update the state of the device.""" """Update the state of the device."""

View File

@ -177,16 +177,10 @@ class ToonBinarySensor(ToonEntity, BinarySensorDevice):
class ToonBoilerBinarySensor(ToonBinarySensor, ToonBoilerDeviceEntity): class ToonBoilerBinarySensor(ToonBinarySensor, ToonBoilerDeviceEntity):
"""Defines a Boiler binary sensor.""" """Defines a Boiler binary sensor."""
pass
class ToonDisplayBinarySensor(ToonBinarySensor, ToonDisplayDeviceEntity): class ToonDisplayBinarySensor(ToonBinarySensor, ToonDisplayDeviceEntity):
"""Defines a Toon Display binary sensor.""" """Defines a Toon Display binary sensor."""
pass
class ToonBoilerModuleBinarySensor(ToonBinarySensor, ToonBoilerModuleDeviceEntity): class ToonBoilerModuleBinarySensor(ToonBinarySensor, ToonBoilerModuleDeviceEntity):
"""Defines a Boiler module binary sensor.""" """Defines a Boiler module binary sensor."""
pass

View File

@ -142,7 +142,6 @@ class ToonThermostatDevice(ToonDisplayDeviceEntity, ClimateDevice):
def set_hvac_mode(self, hvac_mode: str) -> None: def set_hvac_mode(self, hvac_mode: str) -> None:
"""Set new target hvac mode.""" """Set new target hvac mode."""
pass
def update(self) -> None: def update(self) -> None:
"""Update local state.""" """Update local state."""

View File

@ -283,22 +283,14 @@ class ToonSensor(ToonEntity):
class ToonElectricityMeterDeviceSensor(ToonSensor, ToonElectricityMeterDeviceEntity): class ToonElectricityMeterDeviceSensor(ToonSensor, ToonElectricityMeterDeviceEntity):
"""Defines a Electricity Meter sensor.""" """Defines a Electricity Meter sensor."""
pass
class ToonGasMeterDeviceSensor(ToonSensor, ToonGasMeterDeviceEntity): class ToonGasMeterDeviceSensor(ToonSensor, ToonGasMeterDeviceEntity):
"""Defines a Gas Meter sensor.""" """Defines a Gas Meter sensor."""
pass
class ToonSolarDeviceSensor(ToonSensor, ToonSolarDeviceEntity): class ToonSolarDeviceSensor(ToonSensor, ToonSolarDeviceEntity):
"""Defines a Solar sensor.""" """Defines a Solar sensor."""
pass
class ToonBoilerDeviceSensor(ToonSensor, ToonBoilerDeviceEntity): class ToonBoilerDeviceSensor(ToonSensor, ToonBoilerDeviceEntity):
"""Defines a Boiler sensor.""" """Defines a Boiler sensor."""
pass

View File

@ -304,11 +304,9 @@ class VacuumDevice(_BaseVacuum, ToggleEntity):
async def async_pause(self): async def async_pause(self):
"""Not supported.""" """Not supported."""
pass
async def async_start(self): async def async_start(self):
"""Not supported.""" """Not supported."""
pass
class StateVacuumDevice(_BaseVacuum): class StateVacuumDevice(_BaseVacuum):
@ -373,12 +371,9 @@ class StateVacuumDevice(_BaseVacuum):
async def async_turn_on(self, **kwargs): async def async_turn_on(self, **kwargs):
"""Not supported.""" """Not supported."""
pass
async def async_turn_off(self, **kwargs): async def async_turn_off(self, **kwargs):
"""Not supported.""" """Not supported."""
pass
async def async_toggle(self, **kwargs): async def async_toggle(self, **kwargs):
"""Not supported.""" """Not supported."""
pass

View File

@ -82,4 +82,3 @@ class VelbusClimate(VelbusEntity, ClimateDevice):
def set_hvac_mode(self, hvac_mode): def set_hvac_mode(self, hvac_mode):
"""Set new target hvac mode.""" """Set new target hvac mode."""
pass

View File

@ -4,5 +4,3 @@ from homeassistant.exceptions import HomeAssistantError
class Disconnect(HomeAssistantError): class Disconnect(HomeAssistantError):
"""Disconnect the current session.""" """Disconnect the current session."""
pass

View File

@ -38,14 +38,10 @@ NOT_AUTHENTICATED_ERROR = re.compile(
class NotAuthenticatedError(HomeAssistantError): class NotAuthenticatedError(HomeAssistantError):
"""Raise when not authenticated with the service.""" """Raise when not authenticated with the service."""
pass
class ServiceError(HomeAssistantError): class ServiceError(HomeAssistantError):
"""Raise when the service has an error.""" """Raise when the service has an error."""
pass
class ThrottleData: class ThrottleData:
"""Throttle data.""" """Throttle data."""

View File

@ -115,7 +115,6 @@ class XS1ThermostatEntity(XS1DeviceEntity, ClimateDevice):
def set_hvac_mode(self, hvac_mode): def set_hvac_mode(self, hvac_mode):
"""Set new target hvac mode.""" """Set new target hvac mode."""
pass
async def async_update(self): async def async_update(self):
"""Also update the sensor when available.""" """Also update the sensor when available."""

View File

@ -46,7 +46,6 @@ def get_service(hass, config, discovery_info=None):
"Connection Error, could not verify login data for '%s'", "Connection Error, could not verify login data for '%s'",
yesss.get_provider(), yesss.get_provider(),
) )
pass
_LOGGER.debug( _LOGGER.debug(
"initialized; library version: %s, with %s", "initialized; library version: %s, with %s",

View File

@ -75,7 +75,6 @@ class BinarySensor(ZhaEntity, BinarySensorDevice):
async def get_device_class(self): async def get_device_class(self):
"""Get the HA device class from the channel.""" """Get the HA device class from the channel."""
pass
async def async_added_to_hass(self): async def async_added_to_hass(self):
"""Run when about to be added to hass.""" """Run when about to be added to hass."""

View File

@ -205,7 +205,6 @@ class ZigbeeChannel(LogMixin):
@callback @callback
def cluster_command(self, tsn, command_id, args): def cluster_command(self, tsn, command_id, args):
"""Handle commands received to this cluster.""" """Handle commands received to this cluster."""
pass
@callback @callback
def attribute_updated(self, attrid, value): def attribute_updated(self, attrid, value):
@ -220,7 +219,6 @@ class ZigbeeChannel(LogMixin):
@callback @callback
def zdo_command(self, *args, **kwargs): def zdo_command(self, *args, **kwargs):
"""Handle ZDO commands on this cluster.""" """Handle ZDO commands on this cluster."""
pass
@callback @callback
def zha_send_event(self, command: str, args: Union[int, dict]) -> None: def zha_send_event(self, command: str, args: Union[int, dict]) -> None:
@ -236,7 +234,6 @@ class ZigbeeChannel(LogMixin):
async def async_update(self): async def async_update(self):
"""Retrieve latest state from cluster.""" """Retrieve latest state from cluster."""
pass
async def get_attribute_value(self, attribute, from_cache=True): async def get_attribute_value(self, attribute, from_cache=True):
"""Get the value for an attribute.""" """Get the value for an attribute."""
@ -322,12 +319,10 @@ class ZDOChannel(LogMixin):
@callback @callback
def device_announce(self, zigpy_device): def device_announce(self, zigpy_device):
"""Device announce handler.""" """Device announce handler."""
pass
@callback @callback
def permit_duration(self, duration): def permit_duration(self, duration):
"""Permit handler.""" """Permit handler."""
pass
async def async_initialize(self, from_cache): async def async_initialize(self, from_cache):
"""Initialize channel.""" """Initialize channel."""

View File

@ -49,8 +49,6 @@ class DoorLockChannel(ZigbeeChannel):
class Shade(ZigbeeChannel): class Shade(ZigbeeChannel):
"""Shade channel.""" """Shade channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(closures.WindowCovering.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(closures.WindowCovering.cluster_id)
class WindowCovering(ZigbeeChannel): class WindowCovering(ZigbeeChannel):

View File

@ -30,8 +30,6 @@ _LOGGER = logging.getLogger(__name__)
class Alarms(ZigbeeChannel): class Alarms(ZigbeeChannel):
"""Alarms channel.""" """Alarms channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.AnalogInput.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.AnalogInput.cluster_id)
class AnalogInput(ZigbeeChannel): class AnalogInput(ZigbeeChannel):
@ -58,8 +56,6 @@ class AnalogValue(ZigbeeChannel):
class ApplianceContorl(ZigbeeChannel): class ApplianceContorl(ZigbeeChannel):
"""Appliance Control channel.""" """Appliance Control channel."""
pass
@registries.CHANNEL_ONLY_CLUSTERS.register(general.Basic.cluster_id) @registries.CHANNEL_ONLY_CLUSTERS.register(general.Basic.cluster_id)
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Basic.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Basic.cluster_id)
@ -130,29 +126,21 @@ class BinaryValue(ZigbeeChannel):
class Commissioning(ZigbeeChannel): class Commissioning(ZigbeeChannel):
"""Commissioning channel.""" """Commissioning channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.DeviceTemperature.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.DeviceTemperature.cluster_id)
class DeviceTemperature(ZigbeeChannel): class DeviceTemperature(ZigbeeChannel):
"""Device Temperature channel.""" """Device Temperature channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.GreenPowerProxy.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.GreenPowerProxy.cluster_id)
class GreenPowerProxy(ZigbeeChannel): class GreenPowerProxy(ZigbeeChannel):
"""Green Power Proxy channel.""" """Green Power Proxy channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Groups.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Groups.cluster_id)
class Groups(ZigbeeChannel): class Groups(ZigbeeChannel):
"""Groups channel.""" """Groups channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Identify.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Identify.cluster_id)
class Identify(ZigbeeChannel): class Identify(ZigbeeChannel):
@ -171,8 +159,6 @@ class Identify(ZigbeeChannel):
class LevelControlClientChannel(ClientChannel): class LevelControlClientChannel(ClientChannel):
"""LevelControl client cluster.""" """LevelControl client cluster."""
pass
@registries.BINDABLE_CLUSTERS.register(general.LevelControl.cluster_id) @registries.BINDABLE_CLUSTERS.register(general.LevelControl.cluster_id)
@registries.LIGHT_CLUSTERS.register(general.LevelControl.cluster_id) @registries.LIGHT_CLUSTERS.register(general.LevelControl.cluster_id)
@ -244,8 +230,6 @@ class MultistateValue(ZigbeeChannel):
class OnOffClientChannel(ClientChannel): class OnOffClientChannel(ClientChannel):
"""OnOff client channel.""" """OnOff client channel."""
pass
@registries.BINARY_SENSOR_CLUSTERS.register(general.OnOff.cluster_id) @registries.BINARY_SENSOR_CLUSTERS.register(general.OnOff.cluster_id)
@registries.BINDABLE_CLUSTERS.register(general.OnOff.cluster_id) @registries.BINDABLE_CLUSTERS.register(general.OnOff.cluster_id)
@ -331,8 +315,6 @@ class OnOffChannel(ZigbeeChannel):
class OnOffConfiguration(ZigbeeChannel): class OnOffConfiguration(ZigbeeChannel):
"""OnOff Configuration channel.""" """OnOff Configuration channel."""
pass
@registries.CLIENT_CHANNELS_REGISTRY.register(general.Ota.cluster_id) @registries.CLIENT_CHANNELS_REGISTRY.register(general.Ota.cluster_id)
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Ota.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Ota.cluster_id)
@ -354,8 +336,6 @@ class Ota(ZigbeeChannel):
class Partition(ZigbeeChannel): class Partition(ZigbeeChannel):
"""Partition channel.""" """Partition channel."""
pass
@registries.CHANNEL_ONLY_CLUSTERS.register(general.PollControl.cluster_id) @registries.CHANNEL_ONLY_CLUSTERS.register(general.PollControl.cluster_id)
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.PollControl.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.PollControl.cluster_id)
@ -449,32 +429,22 @@ class PowerConfigurationChannel(ZigbeeChannel):
class PowerProfile(ZigbeeChannel): class PowerProfile(ZigbeeChannel):
"""Power Profile channel.""" """Power Profile channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.RSSILocation.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.RSSILocation.cluster_id)
class RSSILocation(ZigbeeChannel): class RSSILocation(ZigbeeChannel):
"""RSSI Location channel.""" """RSSI Location channel."""
pass
@registries.CLIENT_CHANNELS_REGISTRY.register(general.Scenes.cluster_id) @registries.CLIENT_CHANNELS_REGISTRY.register(general.Scenes.cluster_id)
class ScenesClientChannel(ClientChannel): class ScenesClientChannel(ClientChannel):
"""Scenes channel.""" """Scenes channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Scenes.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Scenes.cluster_id)
class Scenes(ZigbeeChannel): class Scenes(ZigbeeChannel):
"""Scenes channel.""" """Scenes channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Time.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Time.cluster_id)
class Time(ZigbeeChannel): class Time(ZigbeeChannel):
"""Time channel.""" """Time channel."""
pass

View File

@ -21,8 +21,6 @@ _LOGGER = logging.getLogger(__name__)
class ApplianceEventAlerts(ZigbeeChannel): class ApplianceEventAlerts(ZigbeeChannel):
"""Appliance Event Alerts channel.""" """Appliance Event Alerts channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register( @registries.ZIGBEE_CHANNEL_REGISTRY.register(
homeautomation.ApplianceIdentification.cluster_id homeautomation.ApplianceIdentification.cluster_id
@ -30,8 +28,6 @@ class ApplianceEventAlerts(ZigbeeChannel):
class ApplianceIdentification(ZigbeeChannel): class ApplianceIdentification(ZigbeeChannel):
"""Appliance Identification channel.""" """Appliance Identification channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register( @registries.ZIGBEE_CHANNEL_REGISTRY.register(
homeautomation.ApplianceStatistics.cluster_id homeautomation.ApplianceStatistics.cluster_id
@ -39,15 +35,11 @@ class ApplianceIdentification(ZigbeeChannel):
class ApplianceStatistics(ZigbeeChannel): class ApplianceStatistics(ZigbeeChannel):
"""Appliance Statistics channel.""" """Appliance Statistics channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(homeautomation.Diagnostic.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(homeautomation.Diagnostic.cluster_id)
class Diagnostic(ZigbeeChannel): class Diagnostic(ZigbeeChannel):
"""Diagnostic channel.""" """Diagnostic channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register( @registries.ZIGBEE_CHANNEL_REGISTRY.register(
homeautomation.ElectricalMeasurement.cluster_id homeautomation.ElectricalMeasurement.cluster_id
@ -127,5 +119,3 @@ class ElectricalMeasurementChannel(ZigbeeChannel):
) )
class MeterIdentification(ZigbeeChannel): class MeterIdentification(ZigbeeChannel):
"""Metering Identification channel.""" """Metering Identification channel."""
pass

View File

@ -17,8 +17,6 @@ _LOGGER = logging.getLogger(__name__)
class Dehumidification(ZigbeeChannel): class Dehumidification(ZigbeeChannel):
"""Dehumidification channel.""" """Dehumidification channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.Fan.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.Fan.cluster_id)
class FanChannel(ZigbeeChannel): class FanChannel(ZigbeeChannel):
@ -67,18 +65,12 @@ class FanChannel(ZigbeeChannel):
class Pump(ZigbeeChannel): class Pump(ZigbeeChannel):
"""Pump channel.""" """Pump channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.Thermostat.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.Thermostat.cluster_id)
class Thermostat(ZigbeeChannel): class Thermostat(ZigbeeChannel):
"""Thermostat channel.""" """Thermostat channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.UserInterface.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.UserInterface.cluster_id)
class UserInterface(ZigbeeChannel): class UserInterface(ZigbeeChannel):
"""User interface (thermostat) channel.""" """User interface (thermostat) channel."""
pass

View File

@ -14,15 +14,11 @@ _LOGGER = logging.getLogger(__name__)
class Ballast(ZigbeeChannel): class Ballast(ZigbeeChannel):
"""Ballast channel.""" """Ballast channel."""
pass
@registries.CLIENT_CHANNELS_REGISTRY.register(lighting.Color.cluster_id) @registries.CLIENT_CHANNELS_REGISTRY.register(lighting.Color.cluster_id)
class ColorClientChannel(ClientChannel): class ColorClientChannel(ClientChannel):
"""Color client channel.""" """Color client channel."""
pass
@registries.BINDABLE_CLUSTERS.register(lighting.Color.cluster_id) @registries.BINDABLE_CLUSTERS.register(lighting.Color.cluster_id)
@registries.LIGHT_CLUSTERS.register(lighting.Color.cluster_id) @registries.LIGHT_CLUSTERS.register(lighting.Color.cluster_id)

View File

@ -13,5 +13,3 @@ _LOGGER = logging.getLogger(__name__)
@registries.ZIGBEE_CHANNEL_REGISTRY.register(lightlink.LightLink.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(lightlink.LightLink.cluster_id)
class LightLink(ZigbeeChannel): class LightLink(ZigbeeChannel):
"""Lightlink channel.""" """Lightlink channel."""
pass

View File

@ -13,99 +13,71 @@ _LOGGER = logging.getLogger(__name__)
class AnalogInputExtended(ZigbeeChannel): class AnalogInputExtended(ZigbeeChannel):
"""Analog Input Extended channel.""" """Analog Input Extended channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogInputRegular.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogInputRegular.cluster_id)
class AnalogInputRegular(ZigbeeChannel): class AnalogInputRegular(ZigbeeChannel):
"""Analog Input Regular channel.""" """Analog Input Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogOutputExtended.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogOutputExtended.cluster_id)
class AnalogOutputExtended(ZigbeeChannel): class AnalogOutputExtended(ZigbeeChannel):
"""Analog Output Regular channel.""" """Analog Output Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogOutputRegular.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogOutputRegular.cluster_id)
class AnalogOutputRegular(ZigbeeChannel): class AnalogOutputRegular(ZigbeeChannel):
"""Analog Output Regular channel.""" """Analog Output Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogValueExtended.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogValueExtended.cluster_id)
class AnalogValueExtended(ZigbeeChannel): class AnalogValueExtended(ZigbeeChannel):
"""Analog Value Extended edition channel.""" """Analog Value Extended edition channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogValueRegular.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogValueRegular.cluster_id)
class AnalogValueRegular(ZigbeeChannel): class AnalogValueRegular(ZigbeeChannel):
"""Analog Value Regular channel.""" """Analog Value Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BacnetProtocolTunnel.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BacnetProtocolTunnel.cluster_id)
class BacnetProtocolTunnel(ZigbeeChannel): class BacnetProtocolTunnel(ZigbeeChannel):
"""Bacnet Protocol Tunnel channel.""" """Bacnet Protocol Tunnel channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryInputExtended.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryInputExtended.cluster_id)
class BinaryInputExtended(ZigbeeChannel): class BinaryInputExtended(ZigbeeChannel):
"""Binary Input Extended channel.""" """Binary Input Extended channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryInputRegular.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryInputRegular.cluster_id)
class BinaryInputRegular(ZigbeeChannel): class BinaryInputRegular(ZigbeeChannel):
"""Binary Input Regular channel.""" """Binary Input Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryOutputExtended.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryOutputExtended.cluster_id)
class BinaryOutputExtended(ZigbeeChannel): class BinaryOutputExtended(ZigbeeChannel):
"""Binary Output Extended channel.""" """Binary Output Extended channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryOutputRegular.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryOutputRegular.cluster_id)
class BinaryOutputRegular(ZigbeeChannel): class BinaryOutputRegular(ZigbeeChannel):
"""Binary Output Regular channel.""" """Binary Output Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryValueExtended.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryValueExtended.cluster_id)
class BinaryValueExtended(ZigbeeChannel): class BinaryValueExtended(ZigbeeChannel):
"""Binary Value Extended channel.""" """Binary Value Extended channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryValueRegular.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryValueRegular.cluster_id)
class BinaryValueRegular(ZigbeeChannel): class BinaryValueRegular(ZigbeeChannel):
"""Binary Value Regular channel.""" """Binary Value Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.GenericTunnel.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.GenericTunnel.cluster_id)
class GenericTunnel(ZigbeeChannel): class GenericTunnel(ZigbeeChannel):
"""Generic Tunnel channel.""" """Generic Tunnel channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register( @registries.ZIGBEE_CHANNEL_REGISTRY.register(
protocol.MultistateInputExtended.cluster_id protocol.MultistateInputExtended.cluster_id
@ -113,15 +85,11 @@ class GenericTunnel(ZigbeeChannel):
class MultiStateInputExtended(ZigbeeChannel): class MultiStateInputExtended(ZigbeeChannel):
"""Multistate Input Extended channel.""" """Multistate Input Extended channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.MultistateInputRegular.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.MultistateInputRegular.cluster_id)
class MultiStateInputRegular(ZigbeeChannel): class MultiStateInputRegular(ZigbeeChannel):
"""Multistate Input Regular channel.""" """Multistate Input Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register( @registries.ZIGBEE_CHANNEL_REGISTRY.register(
protocol.MultistateOutputExtended.cluster_id protocol.MultistateOutputExtended.cluster_id
@ -129,8 +97,6 @@ class MultiStateInputRegular(ZigbeeChannel):
class MultiStateOutputExtended(ZigbeeChannel): class MultiStateOutputExtended(ZigbeeChannel):
"""Multistate Output Extended channel.""" """Multistate Output Extended channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register( @registries.ZIGBEE_CHANNEL_REGISTRY.register(
protocol.MultistateOutputRegular.cluster_id protocol.MultistateOutputRegular.cluster_id
@ -138,8 +104,6 @@ class MultiStateOutputExtended(ZigbeeChannel):
class MultiStateOutputRegular(ZigbeeChannel): class MultiStateOutputRegular(ZigbeeChannel):
"""Multistate Output Regular channel.""" """Multistate Output Regular channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register( @registries.ZIGBEE_CHANNEL_REGISTRY.register(
protocol.MultistateValueExtended.cluster_id protocol.MultistateValueExtended.cluster_id
@ -147,11 +111,7 @@ class MultiStateOutputRegular(ZigbeeChannel):
class MultiStateValueExtended(ZigbeeChannel): class MultiStateValueExtended(ZigbeeChannel):
"""Multistate Value Extended channel.""" """Multistate Value Extended channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.MultistateValueRegular.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.MultistateValueRegular.cluster_id)
class MultiStateValueRegular(ZigbeeChannel): class MultiStateValueRegular(ZigbeeChannel):
"""Multistate Value Regular channel.""" """Multistate Value Regular channel."""
pass

View File

@ -30,8 +30,6 @@ _LOGGER = logging.getLogger(__name__)
class IasAce(ZigbeeChannel): class IasAce(ZigbeeChannel):
"""IAS Ancillary Control Equipment channel.""" """IAS Ancillary Control Equipment channel."""
pass
@registries.CHANNEL_ONLY_CLUSTERS.register(security.IasWd.cluster_id) @registries.CHANNEL_ONLY_CLUSTERS.register(security.IasWd.cluster_id)
@registries.ZIGBEE_CHANNEL_REGISTRY.register(security.IasWd.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(security.IasWd.cluster_id)

View File

@ -17,57 +17,41 @@ _LOGGER = logging.getLogger(__name__)
class Calendar(ZigbeeChannel): class Calendar(ZigbeeChannel):
"""Calendar channel.""" """Calendar channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.DeviceManagement.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.DeviceManagement.cluster_id)
class DeviceManagement(ZigbeeChannel): class DeviceManagement(ZigbeeChannel):
"""Device Management channel.""" """Device Management channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Drlc.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Drlc.cluster_id)
class Drlc(ZigbeeChannel): class Drlc(ZigbeeChannel):
"""Demand Response and Load Control channel.""" """Demand Response and Load Control channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.EnergyManagement.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.EnergyManagement.cluster_id)
class EnergyManagement(ZigbeeChannel): class EnergyManagement(ZigbeeChannel):
"""Energy Management channel.""" """Energy Management channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Events.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Events.cluster_id)
class Events(ZigbeeChannel): class Events(ZigbeeChannel):
"""Event channel.""" """Event channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.KeyEstablishment.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.KeyEstablishment.cluster_id)
class KeyEstablishment(ZigbeeChannel): class KeyEstablishment(ZigbeeChannel):
"""Key Establishment channel.""" """Key Establishment channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.MduPairing.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.MduPairing.cluster_id)
class MduPairing(ZigbeeChannel): class MduPairing(ZigbeeChannel):
"""Pairing channel.""" """Pairing channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Messaging.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Messaging.cluster_id)
class Messaging(ZigbeeChannel): class Messaging(ZigbeeChannel):
"""Messaging channel.""" """Messaging channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Metering.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Metering.cluster_id)
class Metering(ZigbeeChannel): class Metering(ZigbeeChannel):
@ -163,18 +147,12 @@ class Metering(ZigbeeChannel):
class Prepayment(ZigbeeChannel): class Prepayment(ZigbeeChannel):
"""Prepayment channel.""" """Prepayment channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Price.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Price.cluster_id)
class Price(ZigbeeChannel): class Price(ZigbeeChannel):
"""Price channel.""" """Price channel."""
pass
@registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Tunneling.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Tunneling.cluster_id)
class Tunneling(ZigbeeChannel): class Tunneling(ZigbeeChannel):
"""Tunneling channel.""" """Tunneling channel."""
pass

View File

@ -112,7 +112,6 @@ class BaseZhaEntity(RestoreEntity, LogMixin, entity.Entity):
@callback @callback
def async_set_state(self, attr_id: int, attr_name: str, value: Any) -> None: def async_set_state(self, attr_id: int, attr_name: str, value: Any) -> None:
"""Set the entity state.""" """Set the entity state."""
pass
async def async_added_to_hass(self) -> None: async def async_added_to_hass(self) -> None:
"""Run when about to be added to hass.""" """Run when about to be added to hass."""
@ -136,7 +135,6 @@ class BaseZhaEntity(RestoreEntity, LogMixin, entity.Entity):
@callback @callback
def async_restore_last_state(self, last_state) -> None: def async_restore_last_state(self, last_state) -> None:
"""Restore previous state.""" """Restore previous state."""
pass
async def async_accept_signal( async def async_accept_signal(
self, channel: ChannelType, signal: str, func: CALLABLE_T, signal_override=False self, channel: ChannelType, signal: str, func: CALLABLE_T, signal_override=False
@ -282,4 +280,3 @@ class ZhaGroupEntity(BaseZhaEntity):
async def async_update(self) -> None: async def async_update(self) -> None:
"""Update the state of the group entity.""" """Update the state of the group entity."""
pass

View File

@ -121,7 +121,6 @@ class BaseFan(FanEntity):
@callback @callback
def async_set_state(self, attr_id, attr_name, value): def async_set_state(self, attr_id, attr_name, value):
"""Handle state update from channel.""" """Handle state update from channel."""
pass
@STRICT_MATCH(channel_names=CHANNEL_FAN) @STRICT_MATCH(channel_names=CHANNEL_FAN)

View File

@ -158,7 +158,6 @@ class AnalogInput(Sensor):
"""Sensor that displays analog input values.""" """Sensor that displays analog input values."""
SENSOR_ATTR = "present_value" SENSOR_ATTR = "present_value"
pass
@STRICT_MATCH(channel_names=CHANNEL_POWER_CONFIGURATION) @STRICT_MATCH(channel_names=CHANNEL_POWER_CONFIGURATION)

View File

@ -20,5 +20,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
class ZigBeeBinarySensor(ZigBeeDigitalIn, BinarySensorDevice): class ZigBeeBinarySensor(ZigBeeDigitalIn, BinarySensorDevice):
"""Use ZigBeeDigitalIn as binary sensor.""" """Use ZigBeeDigitalIn as binary sensor."""
pass

View File

@ -22,5 +22,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
class ZigBeeLight(ZigBeeDigitalOut, Light): class ZigBeeLight(ZigBeeDigitalOut, Light):
"""Use ZigBeeDigitalOut as light.""" """Use ZigBeeDigitalOut as light."""
pass

View File

@ -21,5 +21,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
class ZigBeeSwitch(ZigBeeDigitalOut, SwitchDevice): class ZigBeeSwitch(ZigBeeDigitalOut, SwitchDevice):
"""Representation of a Zigbee Digital Out device.""" """Representation of a Zigbee Digital Out device."""
pass

View File

@ -1209,7 +1209,6 @@ class ZWaveDeviceEntity(ZWaveBaseEntity):
def value_added(self): def value_added(self):
"""Handle a new value of this entity.""" """Handle a new value of this entity."""
pass
def value_changed(self): def value_changed(self):
"""Handle a changed value for this entity's node.""" """Handle a changed value for this entity's node."""
@ -1263,7 +1262,6 @@ class ZWaveDeviceEntity(ZWaveBaseEntity):
def update_properties(self): def update_properties(self):
"""Update on data changes for node values.""" """Update on data changes for node values."""
pass
@property @property
def should_poll(self): def should_poll(self):

View File

@ -105,8 +105,6 @@ class ZWaveAlarmSensor(ZWaveSensor):
COMMAND_CLASS_ALARM is what we get here. COMMAND_CLASS_ALARM is what we get here.
""" """
pass
class ZWaveBatterySensor(ZWaveSensor): class ZWaveBatterySensor(ZWaveSensor):
"""Representation of Z-Wave device battery level.""" """Representation of Z-Wave device battery level."""

View File

@ -375,7 +375,6 @@ def process_ha_config_upgrade(hass: HomeAssistant) -> None:
config_file.write(config_raw) config_file.write(config_raw)
except OSError: except OSError:
_LOGGER.exception("Migrating to google_translate tts failed") _LOGGER.exception("Migrating to google_translate tts failed")
pass
if version_obj < LooseVersion("0.94") and is_docker_env(): if version_obj < LooseVersion("0.94") and is_docker_env():
# In 0.94 we no longer install packages inside the deps folder when # In 0.94 we no longer install packages inside the deps folder when

View File

@ -67,20 +67,17 @@ class FlowManager(abc.ABC):
Handler key is the domain of the component that we want to set up. Handler key is the domain of the component that we want to set up.
""" """
pass
@abc.abstractmethod @abc.abstractmethod
async def async_finish_flow( async def async_finish_flow(
self, flow: "FlowHandler", result: Dict[str, Any] self, flow: "FlowHandler", result: Dict[str, Any]
) -> Dict[str, Any]: ) -> Dict[str, Any]:
"""Finish a config flow and add an entry.""" """Finish a config flow and add an entry."""
pass
async def async_post_init( async def async_post_init(
self, flow: "FlowHandler", result: Dict[str, Any] self, flow: "FlowHandler", result: Dict[str, Any]
) -> None: ) -> None:
"""Entry has finished executing its first step asynchronously.""" """Entry has finished executing its first step asynchronously."""
pass
@callback @callback
def async_progress(self) -> List[Dict]: def async_progress(self) -> List[Dict]:

View File

@ -96,15 +96,12 @@ class AsyncHandler:
def createLock(self) -> None: def createLock(self) -> None:
"""Ignore lock stuff.""" """Ignore lock stuff."""
pass
def acquire(self) -> None: def acquire(self) -> None:
"""Ignore lock stuff.""" """Ignore lock stuff."""
pass
def release(self) -> None: def release(self) -> None:
"""Ignore lock stuff.""" """Ignore lock stuff."""
pass
@property @property
def level(self) -> int: def level(self) -> int:

View File

@ -4,10 +4,6 @@
class NodeListClass(list): class NodeListClass(list):
"""Wrapper class to be able to add attributes on a list.""" """Wrapper class to be able to add attributes on a list."""
pass
class NodeStrClass(str): class NodeStrClass(str):
"""Wrapper class to be able to add attributes on a string.""" """Wrapper class to be able to add attributes on a string."""
pass

View File

@ -24,7 +24,6 @@ good-names=id,i,j,k,ex,Run,_,fp
# too-few-* - same as too-many-* # too-few-* - same as too-many-*
# abstract-method - with intro of async there are always methods missing # abstract-method - with intro of async there are always methods missing
# inconsistent-return-statements - doesn't handle raise # inconsistent-return-statements - doesn't handle raise
# unnecessary-pass - readability for functions which only contain pass
# import-outside-toplevel - TODO # import-outside-toplevel - TODO
# too-many-ancestors - it's too strict. # too-many-ancestors - it's too strict.
# wrong-import-order - isort guards this # wrong-import-order - isort guards this
@ -49,7 +48,6 @@ disable=
too-many-return-statements, too-many-return-statements,
too-many-statements, too-many-statements,
too-many-boolean-expressions, too-many-boolean-expressions,
unnecessary-pass,
unused-argument, unused-argument,
wrong-import-order wrong-import-order
enable= enable=

View File

@ -74,11 +74,6 @@ async def test_setup_hass(hass: HomeAssistant, aioclient_mock) -> None:
assert forecast[ATTR_FORECAST_CONDITION] == "partlycloudy" assert forecast[ATTR_FORECAST_CONDITION] == "partlycloudy"
async def test_setup_plattform(hass):
"""Test that setup platform does nothing."""
assert await weather_smhi.async_setup_platform(hass, None, None) is None
def test_properties_no_data(hass: HomeAssistant) -> None: def test_properties_no_data(hass: HomeAssistant) -> None:
"""Test properties when no API data available.""" """Test properties when no API data available."""
weather = weather_smhi.SmhiWeather("name", "10", "10") weather = weather_smhi.SmhiWeather("name", "10", "10")