From 7653dc947ad7453329d73a07cb552c4e552dc048 Mon Sep 17 00:00:00 2001 From: Franck Nijhof <git@frenck.dev> Date: Sun, 5 Apr 2020 10:33:07 +0200 Subject: [PATCH] Enable pylint unnecessary-pass (#33650) * Enable pylint unnecessary-pass * Process review suggestions * Fix smhi tests --- homeassistant/auth/providers/__init__.py | 1 - .../components/adguard/config_flow.py | 4 -- homeassistant/components/alexa/entities.py | 1 - homeassistant/components/auth/indieauth.py | 5 --- homeassistant/components/cast/helpers.py | 3 -- homeassistant/components/citybikes/sensor.py | 2 - homeassistant/components/cover/__init__.py | 10 ----- homeassistant/components/daikin/climate.py | 1 - homeassistant/components/daikin/sensor.py | 1 - homeassistant/components/daikin/switch.py | 1 - homeassistant/components/fan/__init__.py | 1 - homeassistant/components/fibaro/__init__.py | 4 -- homeassistant/components/fronius/sensor.py | 1 - homeassistant/components/frontend/__init__.py | 2 - .../components/homekit/accessories.py | 1 - .../components/huawei_lte/__init__.py | 1 - homeassistant/components/hue/light.py | 1 - .../components/icloud/device_tracker.py | 1 - homeassistant/components/incomfort/climate.py | 1 - .../components/isy994/binary_sensor.py | 1 - homeassistant/components/mailbox/__init__.py | 2 - .../components/media_extractor/__init__.py | 4 -- homeassistant/components/mqtt/discovery.py | 2 - .../components/openuv/config_flow.py | 4 -- homeassistant/components/plex/media_player.py | 8 ---- homeassistant/components/plex/sensor.py | 8 ---- homeassistant/components/point/__init__.py | 1 - .../components/python_script/__init__.py | 3 -- homeassistant/components/rflink/light.py | 2 - homeassistant/components/rflink/switch.py | 2 - homeassistant/components/roku/media_player.py | 1 - homeassistant/components/roku/remote.py | 1 - .../components/samsungtv/media_player.py | 7 ---- .../components/simplisafe/__init__.py | 2 - homeassistant/components/smhi/weather.py | 9 ----- homeassistant/components/soma/cover.py | 9 ----- homeassistant/components/starline/account.py | 1 - .../components/tellduslive/binary_sensor.py | 9 ----- homeassistant/components/tellduslive/cover.py | 9 ----- homeassistant/components/tellduslive/light.py | 9 ----- .../components/tellduslive/sensor.py | 9 ----- .../components/tellduslive/switch.py | 9 ----- homeassistant/components/tellstick/cover.py | 3 -- homeassistant/components/tellstick/switch.py | 2 - homeassistant/components/tesla/__init__.py | 2 - .../components/toon/binary_sensor.py | 6 --- homeassistant/components/toon/climate.py | 1 - homeassistant/components/toon/sensor.py | 8 ---- homeassistant/components/vacuum/__init__.py | 5 --- homeassistant/components/velbus/climate.py | 1 - .../components/websocket_api/error.py | 2 - homeassistant/components/withings/common.py | 4 -- homeassistant/components/xs1/climate.py | 1 - homeassistant/components/yessssms/notify.py | 1 - homeassistant/components/zha/binary_sensor.py | 1 - .../components/zha/core/channels/base.py | 5 --- .../components/zha/core/channels/closures.py | 2 - .../components/zha/core/channels/general.py | 30 -------------- .../zha/core/channels/homeautomation.py | 10 ----- .../components/zha/core/channels/hvac.py | 8 ---- .../components/zha/core/channels/lighting.py | 4 -- .../components/zha/core/channels/lightlink.py | 2 - .../components/zha/core/channels/protocol.py | 40 ------------------- .../components/zha/core/channels/security.py | 2 - .../zha/core/channels/smartenergy.py | 22 ---------- homeassistant/components/zha/entity.py | 3 -- homeassistant/components/zha/fan.py | 1 - homeassistant/components/zha/sensor.py | 1 - .../components/zigbee/binary_sensor.py | 2 - homeassistant/components/zigbee/light.py | 2 - homeassistant/components/zigbee/switch.py | 2 - homeassistant/components/zwave/__init__.py | 2 - homeassistant/components/zwave/sensor.py | 2 - homeassistant/config.py | 1 - homeassistant/data_entry_flow.py | 3 -- homeassistant/util/logging.py | 3 -- homeassistant/util/yaml/objects.py | 4 -- pylintrc | 2 - tests/components/smhi/test_weather.py | 5 --- 79 files changed, 349 deletions(-) diff --git a/homeassistant/auth/providers/__init__.py b/homeassistant/auth/providers/__init__.py index bb0fc55b5c4..1fa70e42b3f 100644 --- a/homeassistant/auth/providers/__init__.py +++ b/homeassistant/auth/providers/__init__.py @@ -116,7 +116,6 @@ class AuthProvider: async def async_initialize(self) -> None: """Initialize the auth provider.""" - pass async def auth_provider_from_config( diff --git a/homeassistant/components/adguard/config_flow.py b/homeassistant/components/adguard/config_flow.py index 3657d4ee3ad..e2a226eb4ce 100644 --- a/homeassistant/components/adguard/config_flow.py +++ b/homeassistant/components/adguard/config_flow.py @@ -30,10 +30,6 @@ class AdGuardHomeFlowHandler(ConfigFlow): _hassio_discovery = None - def __init__(self): - """Initialize AgGuard Home flow.""" - pass - async def _show_setup_form(self, errors=None): """Show the setup form to the user.""" return self.async_show_form( diff --git a/homeassistant/components/alexa/entities.py b/homeassistant/components/alexa/entities.py index e5eca399b9c..0943d1a4e52 100644 --- a/homeassistant/components/alexa/entities.py +++ b/homeassistant/components/alexa/entities.py @@ -252,7 +252,6 @@ class AlexaEntity: Raises _UnsupportedInterface. """ - pass def interfaces(self): """Return a list of supported interfaces. diff --git a/homeassistant/components/auth/indieauth.py b/homeassistant/components/auth/indieauth.py index a2d015c279b..cd8e797876f 100644 --- a/homeassistant/components/auth/indieauth.py +++ b/homeassistant/components/auth/indieauth.py @@ -90,21 +90,16 @@ async def fetch_redirect_uris(hass, url): except asyncio.TimeoutError: _LOGGER.error("Timeout while looking up redirect_uri %s", url) - pass except aiohttp.client_exceptions.ClientSSLError: _LOGGER.error("SSL error while looking up redirect_uri %s", url) - pass except aiohttp.client_exceptions.ClientOSError as ex: _LOGGER.error("OS error while looking up redirect_uri %s: %s", url, ex.strerror) - pass except aiohttp.client_exceptions.ClientConnectionError: _LOGGER.error( "Low level connection error while looking up redirect_uri %s", url ) - pass except aiohttp.client_exceptions.ClientError: _LOGGER.error("Unknown error while looking up redirect_uri %s", url) - pass # 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 diff --git a/homeassistant/components/cast/helpers.py b/homeassistant/components/cast/helpers.py index e82f6c9e4ed..b39f8a6ef25 100644 --- a/homeassistant/components/cast/helpers.py +++ b/homeassistant/components/cast/helpers.py @@ -173,7 +173,6 @@ class CastStatusListener: @staticmethod def added_to_multizone(group_uuid): """Handle the cast added to a group.""" - pass def removed_from_multizone(self, group_uuid): """Handle the cast removed from a group.""" @@ -182,7 +181,6 @@ class CastStatusListener: def multizone_new_cast_status(self, group_uuid, cast_status): """Handle reception of a new CastStatus for a group.""" - pass def multizone_new_media_status(self, group_uuid, media_status): """Handle reception of a new MediaStatus for a group.""" @@ -224,7 +222,6 @@ class DynamicGroupCastStatusListener: def new_cast_status(self, cast_status): """Handle reception of a new CastStatus.""" - pass def new_media_status(self, media_status): """Handle reception of a new MediaStatus.""" diff --git a/homeassistant/components/citybikes/sensor.py b/homeassistant/components/citybikes/sensor.py index 8e0b883b726..799fe6acc70 100644 --- a/homeassistant/components/citybikes/sensor.py +++ b/homeassistant/components/citybikes/sensor.py @@ -125,8 +125,6 @@ STATIONS_RESPONSE_SCHEMA = vol.Schema( class CityBikesRequestError(Exception): """Error to indicate a CityBikes API request has failed.""" - pass - async def async_citybikes_request(hass, uri, schema): """Perform a request to CityBikes API endpoint, and parse the response.""" diff --git a/homeassistant/components/cover/__init__.py b/homeassistant/components/cover/__init__.py index e63054d23b2..cb2812f319b 100644 --- a/homeassistant/components/cover/__init__.py +++ b/homeassistant/components/cover/__init__.py @@ -162,7 +162,6 @@ class CoverDevice(Entity): None is unknown, 0 is closed, 100 is fully open. """ - pass @property def current_cover_tilt_position(self): @@ -170,7 +169,6 @@ class CoverDevice(Entity): None is unknown, 0 is closed, 100 is fully open. """ - pass @property def state(self): @@ -223,12 +221,10 @@ class CoverDevice(Entity): @property def is_opening(self): """Return if the cover is opening or not.""" - pass @property def is_closing(self): """Return if the cover is closing or not.""" - pass @property def is_closed(self): @@ -267,7 +263,6 @@ class CoverDevice(Entity): def set_cover_position(self, **kwargs): """Move the cover to a specific position.""" - pass async def async_set_cover_position(self, **kwargs): """Move the cover to a specific position.""" @@ -275,7 +270,6 @@ class CoverDevice(Entity): def stop_cover(self, **kwargs): """Stop the cover.""" - pass async def async_stop_cover(self, **kwargs): """Stop the cover.""" @@ -283,7 +277,6 @@ class CoverDevice(Entity): def open_cover_tilt(self, **kwargs: Any) -> None: """Open the cover tilt.""" - pass async def async_open_cover_tilt(self, **kwargs): """Open the cover tilt.""" @@ -291,7 +284,6 @@ class CoverDevice(Entity): def close_cover_tilt(self, **kwargs: Any) -> None: """Close the cover tilt.""" - pass async def async_close_cover_tilt(self, **kwargs): """Close the cover tilt.""" @@ -299,7 +291,6 @@ class CoverDevice(Entity): def set_cover_tilt_position(self, **kwargs): """Move the cover tilt to a specific position.""" - pass async def async_set_cover_tilt_position(self, **kwargs): """Move the cover tilt to a specific position.""" @@ -309,7 +300,6 @@ class CoverDevice(Entity): def stop_cover_tilt(self, **kwargs): """Stop the cover.""" - pass async def async_stop_cover_tilt(self, **kwargs): """Stop the cover.""" diff --git a/homeassistant/components/daikin/climate.py b/homeassistant/components/daikin/climate.py index d46ea26d487..8b5724e014d 100644 --- a/homeassistant/components/daikin/climate.py +++ b/homeassistant/components/daikin/climate.py @@ -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 config. But even in that case it would have been ignored. """ - pass async def async_setup_entry(hass, entry, async_add_entities): diff --git a/homeassistant/components/daikin/sensor.py b/homeassistant/components/daikin/sensor.py index e3e2e6a0f27..1bda31fc6b0 100644 --- a/homeassistant/components/daikin/sensor.py +++ b/homeassistant/components/daikin/sensor.py @@ -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 config. But even in that case it would have been ignored. """ - pass async def async_setup_entry(hass, entry, async_add_entities): diff --git a/homeassistant/components/daikin/switch.py b/homeassistant/components/daikin/switch.py index e22c0b04995..b7131c29bdd 100644 --- a/homeassistant/components/daikin/switch.py +++ b/homeassistant/components/daikin/switch.py @@ -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 config. But even in that case it would have been ignored. """ - pass async def async_setup_entry(hass, entry, async_add_entities): diff --git a/homeassistant/components/fan/__init__.py b/homeassistant/components/fan/__init__.py index 76bd16a6363..a395a5da470 100644 --- a/homeassistant/components/fan/__init__.py +++ b/homeassistant/components/fan/__init__.py @@ -141,7 +141,6 @@ class FanEntity(ToggleEntity): def oscillate(self, oscillating: bool) -> None: """Oscillate the fan.""" - pass async def async_oscillate(self, oscillating: bool): """Oscillate the fan.""" diff --git a/homeassistant/components/fibaro/__init__.py b/homeassistant/components/fibaro/__init__.py index 89529046f85..dcbffe2a568 100644 --- a/homeassistant/components/fibaro/__init__.py +++ b/homeassistant/components/fibaro/__init__.py @@ -462,10 +462,6 @@ class FibaroDevice(Entity): """Get polling requirement from fibaro device.""" return False - def update(self): - """Call to update state.""" - pass - @property def device_state_attributes(self): """Return the state attributes of the device.""" diff --git a/homeassistant/components/fronius/sensor.py b/homeassistant/components/fronius/sensor.py index 722dc2dc659..7c966a6fa4a 100644 --- a/homeassistant/components/fronius/sensor.py +++ b/homeassistant/components/fronius/sensor.py @@ -186,7 +186,6 @@ class FroniusAdapter: async def _update(self): """Return values of interest.""" - pass async def register(self, sensor): """Register child sensor for update subscriptions.""" diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index d9a39ce5726..2ce710ea419 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -421,11 +421,9 @@ class IndexView(web_urldispatcher.AbstractResource): def freeze(self) -> None: """Freeze the resource.""" - pass def raw_match(self, path: str) -> bool: """Perform a raw match against path.""" - pass def get_template(self): """Get template.""" diff --git a/homeassistant/components/homekit/accessories.py b/homeassistant/components/homekit/accessories.py index ddcc795d262..3d014d13c5d 100644 --- a/homeassistant/components/homekit/accessories.py +++ b/homeassistant/components/homekit/accessories.py @@ -235,7 +235,6 @@ class HomeBridge(Bridge): def setup_message(self): """Prevent print of pyhap setup message to terminal.""" - pass class HomeDriver(AccessoryDriver): diff --git a/homeassistant/components/huawei_lte/__init__.py b/homeassistant/components/huawei_lte/__init__.py index 5d618c1fdb5..272efa5d722 100644 --- a/homeassistant/components/huawei_lte/__init__.py +++ b/homeassistant/components/huawei_lte/__init__.py @@ -600,7 +600,6 @@ class HuaweiLteBaseEntity(Entity): async def async_update_options(self, config_entry: ConfigEntry) -> None: """Update config entry options.""" - pass async def async_added_to_hass(self) -> None: """Connect to update signals.""" diff --git a/homeassistant/components/hue/light.py b/homeassistant/components/hue/light.py index 8a3a5c84c02..fa9dfe7615f 100644 --- a/homeassistant/components/hue/light.py +++ b/homeassistant/components/hue/light.py @@ -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 config. But even in that case it would have been ignored. """ - pass def create_light(item_class, coordinator, bridge, is_group, api, item_id): diff --git a/homeassistant/components/icloud/device_tracker.py b/homeassistant/components/icloud/device_tracker.py index 47a302e2f26..0b245416887 100644 --- a/homeassistant/components/icloud/device_tracker.py +++ b/homeassistant/components/icloud/device_tracker.py @@ -24,7 +24,6 @@ async def async_setup_scanner( hass: HomeAssistantType, config, see, discovery_info=None ): """Old way of setting up the iCloud tracker.""" - pass async def async_setup_entry( diff --git a/homeassistant/components/incomfort/climate.py b/homeassistant/components/incomfort/climate.py index 7d91ca012b9..464ff989941 100644 --- a/homeassistant/components/incomfort/climate.py +++ b/homeassistant/components/incomfort/climate.py @@ -90,4 +90,3 @@ class InComfortClimate(IncomfortChild, ClimateDevice): async def async_set_hvac_mode(self, hvac_mode: str) -> None: """Set new target hvac mode.""" - pass diff --git a/homeassistant/components/isy994/binary_sensor.py b/homeassistant/components/isy994/binary_sensor.py index 917dedd5c53..30b26ea5d24 100644 --- a/homeassistant/components/isy994/binary_sensor.py +++ b/homeassistant/components/isy994/binary_sensor.py @@ -319,7 +319,6 @@ class ISYBinarySensorHeartbeat(ISYDevice, BinarySensorDevice): We listen directly to the Control events for this device. """ - pass @property def value(self) -> object: diff --git a/homeassistant/components/mailbox/__init__.py b/homeassistant/components/mailbox/__init__.py index 8526f6658c7..2275c5eba48 100644 --- a/homeassistant/components/mailbox/__init__.py +++ b/homeassistant/components/mailbox/__init__.py @@ -177,8 +177,6 @@ class Mailbox: class StreamError(Exception): """Media streaming exception.""" - pass - class MailboxView(HomeAssistantView): """Base mailbox view.""" diff --git a/homeassistant/components/media_extractor/__init__.py b/homeassistant/components/media_extractor/__init__.py index 7dc05368dcd..af5ada7d2c9 100644 --- a/homeassistant/components/media_extractor/__init__.py +++ b/homeassistant/components/media_extractor/__init__.py @@ -58,14 +58,10 @@ def setup(hass, config): class MEDownloadException(Exception): """Media extractor download exception.""" - pass - class MEQueryException(Exception): """Media extractor query exception.""" - pass - class MediaExtractor: """Class which encapsulates all extraction logic.""" diff --git a/homeassistant/components/mqtt/discovery.py b/homeassistant/components/mqtt/discovery.py index ce8207fc28d..1f2b7162556 100644 --- a/homeassistant/components/mqtt/discovery.py +++ b/homeassistant/components/mqtt/discovery.py @@ -56,8 +56,6 @@ def set_discovery_hash(hass, discovery_hash): class MQTTConfig(dict): """Dummy class to allow adding attributes.""" - pass - async def async_start( hass: HomeAssistantType, discovery_topic, hass_config, config_entry=None diff --git a/homeassistant/components/openuv/config_flow.py b/homeassistant/components/openuv/config_flow.py index 9874cadb566..aa6e58d6036 100644 --- a/homeassistant/components/openuv/config_flow.py +++ b/homeassistant/components/openuv/config_flow.py @@ -35,10 +35,6 @@ class OpenUvFlowHandler(config_entries.ConfigFlow): VERSION = 2 CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL - def __init__(self): - """Initialize the config flow.""" - pass - async def _show_form(self, errors=None): """Show the form to the user.""" data_schema = vol.Schema( diff --git a/homeassistant/components/plex/media_player.py b/homeassistant/components/plex/media_player.py index aea8ecadaff..00d1b6084ad 100644 --- a/homeassistant/components/plex/media_player.py +++ b/homeassistant/components/plex/media_player.py @@ -42,14 +42,6 @@ from .const import ( _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): """Set up Plex media_player from a config entry.""" server_id = config_entry.data[CONF_SERVER_IDENTIFIER] diff --git a/homeassistant/components/plex/sensor.py b/homeassistant/components/plex/sensor.py index b1e93aec8c0..0e3aa5d4469 100644 --- a/homeassistant/components/plex/sensor.py +++ b/homeassistant/components/plex/sensor.py @@ -17,14 +17,6 @@ from .const import ( _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): """Set up Plex sensor from a config entry.""" server_id = config_entry.data[CONF_SERVER_IDENTIFIER] diff --git a/homeassistant/components/point/__init__.py b/homeassistant/components/point/__init__.py index bb591b79884..d2e4826ba2d 100644 --- a/homeassistant/components/point/__init__.py +++ b/homeassistant/components/point/__init__.py @@ -271,7 +271,6 @@ class MinutPointEntity(Entity): async def _update_callback(self): """Update the value of the sensor.""" - pass @property def available(self): diff --git a/homeassistant/components/python_script/__init__.py b/homeassistant/components/python_script/__init__.py index 6ec94aa8e52..36963dc2f20 100644 --- a/homeassistant/components/python_script/__init__.py +++ b/homeassistant/components/python_script/__init__.py @@ -72,8 +72,6 @@ ALLOWED_DT_UTIL = { class ScriptError(HomeAssistantError): """When a script error occurs.""" - pass - def setup(hass, config): """Initialize the Python script component.""" @@ -216,7 +214,6 @@ class StubPrinter: def __init__(self, _getattr_): """Initialize our printer.""" - pass def _call_print(self, *objects, **kwargs): """Print text.""" diff --git a/homeassistant/components/rflink/light.py b/homeassistant/components/rflink/light.py index 01004a3b45a..18650d2038e 100644 --- a/homeassistant/components/rflink/light.py +++ b/homeassistant/components/rflink/light.py @@ -162,8 +162,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= class RflinkLight(SwitchableRflinkDevice, Light): """Representation of a Rflink light.""" - pass - class DimmableRflinkLight(SwitchableRflinkDevice, Light): """Rflink light device that support dimming.""" diff --git a/homeassistant/components/rflink/switch.py b/homeassistant/components/rflink/switch.py index 943f8a6aae6..83c335f0f03 100644 --- a/homeassistant/components/rflink/switch.py +++ b/homeassistant/components/rflink/switch.py @@ -71,5 +71,3 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info= class RflinkSwitch(SwitchableRflinkDevice, SwitchDevice): """Representation of a Rflink switch.""" - - pass diff --git a/homeassistant/components/roku/media_player.py b/homeassistant/components/roku/media_player.py index e26cce46ee2..99cda9cb411 100644 --- a/homeassistant/components/roku/media_player.py +++ b/homeassistant/components/roku/media_player.py @@ -68,7 +68,6 @@ class RokuDevice(MediaPlayerDevice): self._available = True except (RequestsConnectionError, RequestsReadTimeout, RokuException): self._available = False - pass def get_source_list(self): """Get the list of applications to be used as sources.""" diff --git a/homeassistant/components/roku/remote.py b/homeassistant/components/roku/remote.py index 548282d6b2f..999747c9a27 100644 --- a/homeassistant/components/roku/remote.py +++ b/homeassistant/components/roku/remote.py @@ -43,7 +43,6 @@ class RokuRemote(RemoteDevice): self._available = True except (RequestsConnectionError, RequestsReadTimeout, RokuException): self._available = False - pass @property def name(self): diff --git a/homeassistant/components/samsungtv/media_player.py b/homeassistant/components/samsungtv/media_player.py index 8f12341ee4a..35a374688b5 100644 --- a/homeassistant/components/samsungtv/media_player.py +++ b/homeassistant/components/samsungtv/media_player.py @@ -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): """Set up the Samsung TV from a config entry.""" ip_address = config_entry.data[CONF_IP_ADDRESS] diff --git a/homeassistant/components/simplisafe/__init__.py b/homeassistant/components/simplisafe/__init__.py index bf12951e2ae..04c00171b43 100644 --- a/homeassistant/components/simplisafe/__init__.py +++ b/homeassistant/components/simplisafe/__init__.py @@ -683,7 +683,6 @@ class SimpliSafeEntity(Entity): @callback def async_update_from_rest_api(self): """Update the entity with the provided REST API data.""" - pass @callback def _async_internal_update_from_websocket_event(self, event): @@ -707,7 +706,6 @@ class SimpliSafeEntity(Entity): @callback def async_update_from_websocket_event(self, event): """Update the entity with the provided websocket API data.""" - pass async def async_will_remove_from_hass(self) -> None: """Disconnect dispatcher listener when removed.""" diff --git a/homeassistant/components/smhi/weather.py b/homeassistant/components/smhi/weather.py index 574b8d85767..0c5450b5ddd 100644 --- a/homeassistant/components/smhi/weather.py +++ b/homeassistant/components/smhi/weather.py @@ -51,15 +51,6 @@ RETRY_TIMEOUT = 5 * 60 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( hass: HomeAssistant, config_entry: ConfigEntry, config_entries ) -> bool: diff --git a/homeassistant/components/soma/cover.py b/homeassistant/components/soma/cover.py index d23cc9ec5d0..9bfe903e724 100644 --- a/homeassistant/components/soma/cover.py +++ b/homeassistant/components/soma/cover.py @@ -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): """Representation of a Soma cover device.""" diff --git a/homeassistant/components/starline/account.py b/homeassistant/components/starline/account.py index 8d0214d1b5c..3ee716ec856 100644 --- a/homeassistant/components/starline/account.py +++ b/homeassistant/components/starline/account.py @@ -61,7 +61,6 @@ class StarlineAccount: ) except Exception as err: # pylint: disable=broad-except LOGGER.error("Error updating SLNet token: %s", err) - pass def _update_data(self): """Update StarLine data.""" diff --git a/homeassistant/components/tellduslive/binary_sensor.py b/homeassistant/components/tellduslive/binary_sensor.py index ef1cd52f75b..09541a120fd 100644 --- a/homeassistant/components/tellduslive/binary_sensor.py +++ b/homeassistant/components/tellduslive/binary_sensor.py @@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity _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): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellduslive/cover.py b/homeassistant/components/tellduslive/cover.py index 230f89b0531..6e31cd595bf 100644 --- a/homeassistant/components/tellduslive/cover.py +++ b/homeassistant/components/tellduslive/cover.py @@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity _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): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellduslive/light.py b/homeassistant/components/tellduslive/light.py index c4921e3855e..3087c4cdf08 100644 --- a/homeassistant/components/tellduslive/light.py +++ b/homeassistant/components/tellduslive/light.py @@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity _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): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellduslive/sensor.py b/homeassistant/components/tellduslive/sensor.py index 11411e1d6ea..472c430da16 100644 --- a/homeassistant/components/tellduslive/sensor.py +++ b/homeassistant/components/tellduslive/sensor.py @@ -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): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellduslive/switch.py b/homeassistant/components/tellduslive/switch.py index 20c5fba7f9f..05a3c166213 100644 --- a/homeassistant/components/tellduslive/switch.py +++ b/homeassistant/components/tellduslive/switch.py @@ -10,15 +10,6 @@ from .entry import TelldusLiveEntity _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): """Set up tellduslive sensors dynamically.""" diff --git a/homeassistant/components/tellstick/cover.py b/homeassistant/components/tellstick/cover.py index 87571baa2c9..0a5643fc1ea 100644 --- a/homeassistant/components/tellstick/cover.py +++ b/homeassistant/components/tellstick/cover.py @@ -55,12 +55,9 @@ class TellstickCover(TellstickDevice, CoverDevice): def _parse_tellcore_data(self, tellcore_data): """Turn the value received from tellcore into something useful.""" - pass def _parse_ha_data(self, kwargs): """Turn the value from HA into something useful.""" - pass def _update_model(self, new_state, data): """Update the device entity state to match the arguments.""" - pass diff --git a/homeassistant/components/tellstick/switch.py b/homeassistant/components/tellstick/switch.py index e16f9983d00..8797e8e61e6 100644 --- a/homeassistant/components/tellstick/switch.py +++ b/homeassistant/components/tellstick/switch.py @@ -34,11 +34,9 @@ class TellstickSwitch(TellstickDevice, ToggleEntity): def _parse_ha_data(self, kwargs): """Turn the value from HA into something useful.""" - pass def _parse_tellcore_data(self, tellcore_data): """Turn the value received from tellcore into something useful.""" - pass def _update_model(self, new_state, data): """Update the device entity state to match the arguments.""" diff --git a/homeassistant/components/tesla/__init__.py b/homeassistant/components/tesla/__init__.py index 2d08b48e0af..d2b5f091021 100644 --- a/homeassistant/components/tesla/__init__.py +++ b/homeassistant/components/tesla/__init__.py @@ -250,11 +250,9 @@ class TeslaDevice(Entity): async def async_added_to_hass(self): """Register state update callback.""" - pass async def async_will_remove_from_hass(self): """Prepare for unload.""" - pass async def async_update(self): """Update the state of the device.""" diff --git a/homeassistant/components/toon/binary_sensor.py b/homeassistant/components/toon/binary_sensor.py index 7cf52919efe..e6ef780ec8e 100644 --- a/homeassistant/components/toon/binary_sensor.py +++ b/homeassistant/components/toon/binary_sensor.py @@ -177,16 +177,10 @@ class ToonBinarySensor(ToonEntity, BinarySensorDevice): class ToonBoilerBinarySensor(ToonBinarySensor, ToonBoilerDeviceEntity): """Defines a Boiler binary sensor.""" - pass - class ToonDisplayBinarySensor(ToonBinarySensor, ToonDisplayDeviceEntity): """Defines a Toon Display binary sensor.""" - pass - class ToonBoilerModuleBinarySensor(ToonBinarySensor, ToonBoilerModuleDeviceEntity): """Defines a Boiler module binary sensor.""" - - pass diff --git a/homeassistant/components/toon/climate.py b/homeassistant/components/toon/climate.py index 9ce9991c371..fac9cf4ffc2 100644 --- a/homeassistant/components/toon/climate.py +++ b/homeassistant/components/toon/climate.py @@ -142,7 +142,6 @@ class ToonThermostatDevice(ToonDisplayDeviceEntity, ClimateDevice): def set_hvac_mode(self, hvac_mode: str) -> None: """Set new target hvac mode.""" - pass def update(self) -> None: """Update local state.""" diff --git a/homeassistant/components/toon/sensor.py b/homeassistant/components/toon/sensor.py index a5e88bb3d2f..157c357e180 100644 --- a/homeassistant/components/toon/sensor.py +++ b/homeassistant/components/toon/sensor.py @@ -283,22 +283,14 @@ class ToonSensor(ToonEntity): class ToonElectricityMeterDeviceSensor(ToonSensor, ToonElectricityMeterDeviceEntity): """Defines a Electricity Meter sensor.""" - pass - class ToonGasMeterDeviceSensor(ToonSensor, ToonGasMeterDeviceEntity): """Defines a Gas Meter sensor.""" - pass - class ToonSolarDeviceSensor(ToonSensor, ToonSolarDeviceEntity): """Defines a Solar sensor.""" - pass - class ToonBoilerDeviceSensor(ToonSensor, ToonBoilerDeviceEntity): """Defines a Boiler sensor.""" - - pass diff --git a/homeassistant/components/vacuum/__init__.py b/homeassistant/components/vacuum/__init__.py index 3cd2de600e3..f66a1b5f226 100644 --- a/homeassistant/components/vacuum/__init__.py +++ b/homeassistant/components/vacuum/__init__.py @@ -304,11 +304,9 @@ class VacuumDevice(_BaseVacuum, ToggleEntity): async def async_pause(self): """Not supported.""" - pass async def async_start(self): """Not supported.""" - pass class StateVacuumDevice(_BaseVacuum): @@ -373,12 +371,9 @@ class StateVacuumDevice(_BaseVacuum): async def async_turn_on(self, **kwargs): """Not supported.""" - pass async def async_turn_off(self, **kwargs): """Not supported.""" - pass async def async_toggle(self, **kwargs): """Not supported.""" - pass diff --git a/homeassistant/components/velbus/climate.py b/homeassistant/components/velbus/climate.py index e322cfb77c7..38d893e7343 100644 --- a/homeassistant/components/velbus/climate.py +++ b/homeassistant/components/velbus/climate.py @@ -82,4 +82,3 @@ class VelbusClimate(VelbusEntity, ClimateDevice): def set_hvac_mode(self, hvac_mode): """Set new target hvac mode.""" - pass diff --git a/homeassistant/components/websocket_api/error.py b/homeassistant/components/websocket_api/error.py index c0b7ea04554..5d4ca93105d 100644 --- a/homeassistant/components/websocket_api/error.py +++ b/homeassistant/components/websocket_api/error.py @@ -4,5 +4,3 @@ from homeassistant.exceptions import HomeAssistantError class Disconnect(HomeAssistantError): """Disconnect the current session.""" - - pass diff --git a/homeassistant/components/withings/common.py b/homeassistant/components/withings/common.py index 3a9d1d52751..ac7bc149cd9 100644 --- a/homeassistant/components/withings/common.py +++ b/homeassistant/components/withings/common.py @@ -38,14 +38,10 @@ NOT_AUTHENTICATED_ERROR = re.compile( class NotAuthenticatedError(HomeAssistantError): """Raise when not authenticated with the service.""" - pass - class ServiceError(HomeAssistantError): """Raise when the service has an error.""" - pass - class ThrottleData: """Throttle data.""" diff --git a/homeassistant/components/xs1/climate.py b/homeassistant/components/xs1/climate.py index 33c778c0d3d..19d5ae1e904 100644 --- a/homeassistant/components/xs1/climate.py +++ b/homeassistant/components/xs1/climate.py @@ -115,7 +115,6 @@ class XS1ThermostatEntity(XS1DeviceEntity, ClimateDevice): def set_hvac_mode(self, hvac_mode): """Set new target hvac mode.""" - pass async def async_update(self): """Also update the sensor when available.""" diff --git a/homeassistant/components/yessssms/notify.py b/homeassistant/components/yessssms/notify.py index fbc6b50e8d6..863602134a4 100644 --- a/homeassistant/components/yessssms/notify.py +++ b/homeassistant/components/yessssms/notify.py @@ -46,7 +46,6 @@ def get_service(hass, config, discovery_info=None): "Connection Error, could not verify login data for '%s'", yesss.get_provider(), ) - pass _LOGGER.debug( "initialized; library version: %s, with %s", diff --git a/homeassistant/components/zha/binary_sensor.py b/homeassistant/components/zha/binary_sensor.py index 9ed1bbfca16..044d32890da 100644 --- a/homeassistant/components/zha/binary_sensor.py +++ b/homeassistant/components/zha/binary_sensor.py @@ -75,7 +75,6 @@ class BinarySensor(ZhaEntity, BinarySensorDevice): async def get_device_class(self): """Get the HA device class from the channel.""" - pass async def async_added_to_hass(self): """Run when about to be added to hass.""" diff --git a/homeassistant/components/zha/core/channels/base.py b/homeassistant/components/zha/core/channels/base.py index a5255e7f756..8478c2b9c49 100644 --- a/homeassistant/components/zha/core/channels/base.py +++ b/homeassistant/components/zha/core/channels/base.py @@ -205,7 +205,6 @@ class ZigbeeChannel(LogMixin): @callback def cluster_command(self, tsn, command_id, args): """Handle commands received to this cluster.""" - pass @callback def attribute_updated(self, attrid, value): @@ -220,7 +219,6 @@ class ZigbeeChannel(LogMixin): @callback def zdo_command(self, *args, **kwargs): """Handle ZDO commands on this cluster.""" - pass @callback def zha_send_event(self, command: str, args: Union[int, dict]) -> None: @@ -236,7 +234,6 @@ class ZigbeeChannel(LogMixin): async def async_update(self): """Retrieve latest state from cluster.""" - pass async def get_attribute_value(self, attribute, from_cache=True): """Get the value for an attribute.""" @@ -322,12 +319,10 @@ class ZDOChannel(LogMixin): @callback def device_announce(self, zigpy_device): """Device announce handler.""" - pass @callback def permit_duration(self, duration): """Permit handler.""" - pass async def async_initialize(self, from_cache): """Initialize channel.""" diff --git a/homeassistant/components/zha/core/channels/closures.py b/homeassistant/components/zha/core/channels/closures.py index 2b6c06ba12a..826c99fbd3b 100644 --- a/homeassistant/components/zha/core/channels/closures.py +++ b/homeassistant/components/zha/core/channels/closures.py @@ -49,8 +49,6 @@ class DoorLockChannel(ZigbeeChannel): class Shade(ZigbeeChannel): """Shade channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(closures.WindowCovering.cluster_id) class WindowCovering(ZigbeeChannel): diff --git a/homeassistant/components/zha/core/channels/general.py b/homeassistant/components/zha/core/channels/general.py index f2afadbd657..05406b6939e 100644 --- a/homeassistant/components/zha/core/channels/general.py +++ b/homeassistant/components/zha/core/channels/general.py @@ -30,8 +30,6 @@ _LOGGER = logging.getLogger(__name__) class Alarms(ZigbeeChannel): """Alarms channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.AnalogInput.cluster_id) class AnalogInput(ZigbeeChannel): @@ -58,8 +56,6 @@ class AnalogValue(ZigbeeChannel): class ApplianceContorl(ZigbeeChannel): """Appliance Control channel.""" - pass - @registries.CHANNEL_ONLY_CLUSTERS.register(general.Basic.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Basic.cluster_id) @@ -130,29 +126,21 @@ class BinaryValue(ZigbeeChannel): class Commissioning(ZigbeeChannel): """Commissioning channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.DeviceTemperature.cluster_id) class DeviceTemperature(ZigbeeChannel): """Device Temperature channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.GreenPowerProxy.cluster_id) class GreenPowerProxy(ZigbeeChannel): """Green Power Proxy channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Groups.cluster_id) class Groups(ZigbeeChannel): """Groups channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Identify.cluster_id) class Identify(ZigbeeChannel): @@ -171,8 +159,6 @@ class Identify(ZigbeeChannel): class LevelControlClientChannel(ClientChannel): """LevelControl client cluster.""" - pass - @registries.BINDABLE_CLUSTERS.register(general.LevelControl.cluster_id) @registries.LIGHT_CLUSTERS.register(general.LevelControl.cluster_id) @@ -244,8 +230,6 @@ class MultistateValue(ZigbeeChannel): class OnOffClientChannel(ClientChannel): """OnOff client channel.""" - pass - @registries.BINARY_SENSOR_CLUSTERS.register(general.OnOff.cluster_id) @registries.BINDABLE_CLUSTERS.register(general.OnOff.cluster_id) @@ -331,8 +315,6 @@ class OnOffChannel(ZigbeeChannel): class OnOffConfiguration(ZigbeeChannel): """OnOff Configuration channel.""" - pass - @registries.CLIENT_CHANNELS_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): """Partition channel.""" - pass - @registries.CHANNEL_ONLY_CLUSTERS.register(general.PollControl.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.PollControl.cluster_id) @@ -449,32 +429,22 @@ class PowerConfigurationChannel(ZigbeeChannel): class PowerProfile(ZigbeeChannel): """Power Profile channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.RSSILocation.cluster_id) class RSSILocation(ZigbeeChannel): """RSSI Location channel.""" - pass - @registries.CLIENT_CHANNELS_REGISTRY.register(general.Scenes.cluster_id) class ScenesClientChannel(ClientChannel): """Scenes channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Scenes.cluster_id) class Scenes(ZigbeeChannel): """Scenes channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(general.Time.cluster_id) class Time(ZigbeeChannel): """Time channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/homeautomation.py b/homeassistant/components/zha/core/channels/homeautomation.py index 1df7cf117e2..c867fdc621d 100644 --- a/homeassistant/components/zha/core/channels/homeautomation.py +++ b/homeassistant/components/zha/core/channels/homeautomation.py @@ -21,8 +21,6 @@ _LOGGER = logging.getLogger(__name__) class ApplianceEventAlerts(ZigbeeChannel): """Appliance Event Alerts channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( homeautomation.ApplianceIdentification.cluster_id @@ -30,8 +28,6 @@ class ApplianceEventAlerts(ZigbeeChannel): class ApplianceIdentification(ZigbeeChannel): """Appliance Identification channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( homeautomation.ApplianceStatistics.cluster_id @@ -39,15 +35,11 @@ class ApplianceIdentification(ZigbeeChannel): class ApplianceStatistics(ZigbeeChannel): """Appliance Statistics channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(homeautomation.Diagnostic.cluster_id) class Diagnostic(ZigbeeChannel): """Diagnostic channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( homeautomation.ElectricalMeasurement.cluster_id @@ -127,5 +119,3 @@ class ElectricalMeasurementChannel(ZigbeeChannel): ) class MeterIdentification(ZigbeeChannel): """Metering Identification channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/hvac.py b/homeassistant/components/zha/core/channels/hvac.py index 3c00e186ebb..bd90b907d3b 100644 --- a/homeassistant/components/zha/core/channels/hvac.py +++ b/homeassistant/components/zha/core/channels/hvac.py @@ -17,8 +17,6 @@ _LOGGER = logging.getLogger(__name__) class Dehumidification(ZigbeeChannel): """Dehumidification channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.Fan.cluster_id) class FanChannel(ZigbeeChannel): @@ -67,18 +65,12 @@ class FanChannel(ZigbeeChannel): class Pump(ZigbeeChannel): """Pump channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.Thermostat.cluster_id) class Thermostat(ZigbeeChannel): """Thermostat channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(hvac.UserInterface.cluster_id) class UserInterface(ZigbeeChannel): """User interface (thermostat) channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/lighting.py b/homeassistant/components/zha/core/channels/lighting.py index 25f6c05d739..9721bee9014 100644 --- a/homeassistant/components/zha/core/channels/lighting.py +++ b/homeassistant/components/zha/core/channels/lighting.py @@ -14,15 +14,11 @@ _LOGGER = logging.getLogger(__name__) class Ballast(ZigbeeChannel): """Ballast channel.""" - pass - @registries.CLIENT_CHANNELS_REGISTRY.register(lighting.Color.cluster_id) class ColorClientChannel(ClientChannel): """Color client channel.""" - pass - @registries.BINDABLE_CLUSTERS.register(lighting.Color.cluster_id) @registries.LIGHT_CLUSTERS.register(lighting.Color.cluster_id) diff --git a/homeassistant/components/zha/core/channels/lightlink.py b/homeassistant/components/zha/core/channels/lightlink.py index af0248c9713..25f3ebf9686 100644 --- a/homeassistant/components/zha/core/channels/lightlink.py +++ b/homeassistant/components/zha/core/channels/lightlink.py @@ -13,5 +13,3 @@ _LOGGER = logging.getLogger(__name__) @registries.ZIGBEE_CHANNEL_REGISTRY.register(lightlink.LightLink.cluster_id) class LightLink(ZigbeeChannel): """Lightlink channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/protocol.py b/homeassistant/components/zha/core/channels/protocol.py index db7488e9a7f..083e0f55841 100644 --- a/homeassistant/components/zha/core/channels/protocol.py +++ b/homeassistant/components/zha/core/channels/protocol.py @@ -13,99 +13,71 @@ _LOGGER = logging.getLogger(__name__) class AnalogInputExtended(ZigbeeChannel): """Analog Input Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogInputRegular.cluster_id) class AnalogInputRegular(ZigbeeChannel): """Analog Input Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogOutputExtended.cluster_id) class AnalogOutputExtended(ZigbeeChannel): """Analog Output Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogOutputRegular.cluster_id) class AnalogOutputRegular(ZigbeeChannel): """Analog Output Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogValueExtended.cluster_id) class AnalogValueExtended(ZigbeeChannel): """Analog Value Extended edition channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.AnalogValueRegular.cluster_id) class AnalogValueRegular(ZigbeeChannel): """Analog Value Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BacnetProtocolTunnel.cluster_id) class BacnetProtocolTunnel(ZigbeeChannel): """Bacnet Protocol Tunnel channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryInputExtended.cluster_id) class BinaryInputExtended(ZigbeeChannel): """Binary Input Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryInputRegular.cluster_id) class BinaryInputRegular(ZigbeeChannel): """Binary Input Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryOutputExtended.cluster_id) class BinaryOutputExtended(ZigbeeChannel): """Binary Output Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryOutputRegular.cluster_id) class BinaryOutputRegular(ZigbeeChannel): """Binary Output Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryValueExtended.cluster_id) class BinaryValueExtended(ZigbeeChannel): """Binary Value Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.BinaryValueRegular.cluster_id) class BinaryValueRegular(ZigbeeChannel): """Binary Value Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.GenericTunnel.cluster_id) class GenericTunnel(ZigbeeChannel): """Generic Tunnel channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( protocol.MultistateInputExtended.cluster_id @@ -113,15 +85,11 @@ class GenericTunnel(ZigbeeChannel): class MultiStateInputExtended(ZigbeeChannel): """Multistate Input Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.MultistateInputRegular.cluster_id) class MultiStateInputRegular(ZigbeeChannel): """Multistate Input Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( protocol.MultistateOutputExtended.cluster_id @@ -129,8 +97,6 @@ class MultiStateInputRegular(ZigbeeChannel): class MultiStateOutputExtended(ZigbeeChannel): """Multistate Output Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( protocol.MultistateOutputRegular.cluster_id @@ -138,8 +104,6 @@ class MultiStateOutputExtended(ZigbeeChannel): class MultiStateOutputRegular(ZigbeeChannel): """Multistate Output Regular channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register( protocol.MultistateValueExtended.cluster_id @@ -147,11 +111,7 @@ class MultiStateOutputRegular(ZigbeeChannel): class MultiStateValueExtended(ZigbeeChannel): """Multistate Value Extended channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(protocol.MultistateValueRegular.cluster_id) class MultiStateValueRegular(ZigbeeChannel): """Multistate Value Regular channel.""" - - pass diff --git a/homeassistant/components/zha/core/channels/security.py b/homeassistant/components/zha/core/channels/security.py index 822ae8dd911..914c1133116 100644 --- a/homeassistant/components/zha/core/channels/security.py +++ b/homeassistant/components/zha/core/channels/security.py @@ -30,8 +30,6 @@ _LOGGER = logging.getLogger(__name__) class IasAce(ZigbeeChannel): """IAS Ancillary Control Equipment channel.""" - pass - @registries.CHANNEL_ONLY_CLUSTERS.register(security.IasWd.cluster_id) @registries.ZIGBEE_CHANNEL_REGISTRY.register(security.IasWd.cluster_id) diff --git a/homeassistant/components/zha/core/channels/smartenergy.py b/homeassistant/components/zha/core/channels/smartenergy.py index 86533662838..4226aad3f0a 100644 --- a/homeassistant/components/zha/core/channels/smartenergy.py +++ b/homeassistant/components/zha/core/channels/smartenergy.py @@ -17,57 +17,41 @@ _LOGGER = logging.getLogger(__name__) class Calendar(ZigbeeChannel): """Calendar channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.DeviceManagement.cluster_id) class DeviceManagement(ZigbeeChannel): """Device Management channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Drlc.cluster_id) class Drlc(ZigbeeChannel): """Demand Response and Load Control channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.EnergyManagement.cluster_id) class EnergyManagement(ZigbeeChannel): """Energy Management channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Events.cluster_id) class Events(ZigbeeChannel): """Event channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.KeyEstablishment.cluster_id) class KeyEstablishment(ZigbeeChannel): """Key Establishment channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.MduPairing.cluster_id) class MduPairing(ZigbeeChannel): """Pairing channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Messaging.cluster_id) class Messaging(ZigbeeChannel): """Messaging channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Metering.cluster_id) class Metering(ZigbeeChannel): @@ -163,18 +147,12 @@ class Metering(ZigbeeChannel): class Prepayment(ZigbeeChannel): """Prepayment channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Price.cluster_id) class Price(ZigbeeChannel): """Price channel.""" - pass - @registries.ZIGBEE_CHANNEL_REGISTRY.register(smartenergy.Tunneling.cluster_id) class Tunneling(ZigbeeChannel): """Tunneling channel.""" - - pass diff --git a/homeassistant/components/zha/entity.py b/homeassistant/components/zha/entity.py index 2d098d60bfb..0ba7ff09f3f 100644 --- a/homeassistant/components/zha/entity.py +++ b/homeassistant/components/zha/entity.py @@ -112,7 +112,6 @@ class BaseZhaEntity(RestoreEntity, LogMixin, entity.Entity): @callback def async_set_state(self, attr_id: int, attr_name: str, value: Any) -> None: """Set the entity state.""" - pass async def async_added_to_hass(self) -> None: """Run when about to be added to hass.""" @@ -136,7 +135,6 @@ class BaseZhaEntity(RestoreEntity, LogMixin, entity.Entity): @callback def async_restore_last_state(self, last_state) -> None: """Restore previous state.""" - pass async def async_accept_signal( self, channel: ChannelType, signal: str, func: CALLABLE_T, signal_override=False @@ -282,4 +280,3 @@ class ZhaGroupEntity(BaseZhaEntity): async def async_update(self) -> None: """Update the state of the group entity.""" - pass diff --git a/homeassistant/components/zha/fan.py b/homeassistant/components/zha/fan.py index c3cd88b0d6d..8a9dc2691fc 100644 --- a/homeassistant/components/zha/fan.py +++ b/homeassistant/components/zha/fan.py @@ -121,7 +121,6 @@ class BaseFan(FanEntity): @callback def async_set_state(self, attr_id, attr_name, value): """Handle state update from channel.""" - pass @STRICT_MATCH(channel_names=CHANNEL_FAN) diff --git a/homeassistant/components/zha/sensor.py b/homeassistant/components/zha/sensor.py index 5e2e8bf4a0d..4544780b4f8 100644 --- a/homeassistant/components/zha/sensor.py +++ b/homeassistant/components/zha/sensor.py @@ -158,7 +158,6 @@ class AnalogInput(Sensor): """Sensor that displays analog input values.""" SENSOR_ATTR = "present_value" - pass @STRICT_MATCH(channel_names=CHANNEL_POWER_CONFIGURATION) diff --git a/homeassistant/components/zigbee/binary_sensor.py b/homeassistant/components/zigbee/binary_sensor.py index d8a5949be4c..8b37107b906 100644 --- a/homeassistant/components/zigbee/binary_sensor.py +++ b/homeassistant/components/zigbee/binary_sensor.py @@ -20,5 +20,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None): class ZigBeeBinarySensor(ZigBeeDigitalIn, BinarySensorDevice): """Use ZigBeeDigitalIn as binary sensor.""" - - pass diff --git a/homeassistant/components/zigbee/light.py b/homeassistant/components/zigbee/light.py index 9a48efe8a95..86994a55446 100644 --- a/homeassistant/components/zigbee/light.py +++ b/homeassistant/components/zigbee/light.py @@ -22,5 +22,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None): class ZigBeeLight(ZigBeeDigitalOut, Light): """Use ZigBeeDigitalOut as light.""" - - pass diff --git a/homeassistant/components/zigbee/switch.py b/homeassistant/components/zigbee/switch.py index 4e8d21f438a..71e419e410f 100644 --- a/homeassistant/components/zigbee/switch.py +++ b/homeassistant/components/zigbee/switch.py @@ -21,5 +21,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None): class ZigBeeSwitch(ZigBeeDigitalOut, SwitchDevice): """Representation of a Zigbee Digital Out device.""" - - pass diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index 4e3f2e9af57..9beef00a921 100644 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -1209,7 +1209,6 @@ class ZWaveDeviceEntity(ZWaveBaseEntity): def value_added(self): """Handle a new value of this entity.""" - pass def value_changed(self): """Handle a changed value for this entity's node.""" @@ -1263,7 +1262,6 @@ class ZWaveDeviceEntity(ZWaveBaseEntity): def update_properties(self): """Update on data changes for node values.""" - pass @property def should_poll(self): diff --git a/homeassistant/components/zwave/sensor.py b/homeassistant/components/zwave/sensor.py index b732e3569ed..b551e436352 100644 --- a/homeassistant/components/zwave/sensor.py +++ b/homeassistant/components/zwave/sensor.py @@ -105,8 +105,6 @@ class ZWaveAlarmSensor(ZWaveSensor): COMMAND_CLASS_ALARM is what we get here. """ - pass - class ZWaveBatterySensor(ZWaveSensor): """Representation of Z-Wave device battery level.""" diff --git a/homeassistant/config.py b/homeassistant/config.py index 0ac86c4eb4b..068dbd47fa9 100644 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -375,7 +375,6 @@ def process_ha_config_upgrade(hass: HomeAssistant) -> None: config_file.write(config_raw) except OSError: _LOGGER.exception("Migrating to google_translate tts failed") - pass if version_obj < LooseVersion("0.94") and is_docker_env(): # In 0.94 we no longer install packages inside the deps folder when diff --git a/homeassistant/data_entry_flow.py b/homeassistant/data_entry_flow.py index 4a115762be4..0d419ae66c2 100644 --- a/homeassistant/data_entry_flow.py +++ b/homeassistant/data_entry_flow.py @@ -67,20 +67,17 @@ class FlowManager(abc.ABC): Handler key is the domain of the component that we want to set up. """ - pass @abc.abstractmethod async def async_finish_flow( self, flow: "FlowHandler", result: Dict[str, Any] ) -> Dict[str, Any]: """Finish a config flow and add an entry.""" - pass async def async_post_init( self, flow: "FlowHandler", result: Dict[str, Any] ) -> None: """Entry has finished executing its first step asynchronously.""" - pass @callback def async_progress(self) -> List[Dict]: diff --git a/homeassistant/util/logging.py b/homeassistant/util/logging.py index 1a46a34c1a8..abadb613168 100644 --- a/homeassistant/util/logging.py +++ b/homeassistant/util/logging.py @@ -96,15 +96,12 @@ class AsyncHandler: def createLock(self) -> None: """Ignore lock stuff.""" - pass def acquire(self) -> None: """Ignore lock stuff.""" - pass def release(self) -> None: """Ignore lock stuff.""" - pass @property def level(self) -> int: diff --git a/homeassistant/util/yaml/objects.py b/homeassistant/util/yaml/objects.py index 183c6c171d6..cae957740e4 100644 --- a/homeassistant/util/yaml/objects.py +++ b/homeassistant/util/yaml/objects.py @@ -4,10 +4,6 @@ class NodeListClass(list): """Wrapper class to be able to add attributes on a list.""" - pass - class NodeStrClass(str): """Wrapper class to be able to add attributes on a string.""" - - pass diff --git a/pylintrc b/pylintrc index 1b08c40793a..38c9beb28e5 100644 --- a/pylintrc +++ b/pylintrc @@ -24,7 +24,6 @@ good-names=id,i,j,k,ex,Run,_,fp # too-few-* - same as too-many-* # abstract-method - with intro of async there are always methods missing # inconsistent-return-statements - doesn't handle raise -# unnecessary-pass - readability for functions which only contain pass # import-outside-toplevel - TODO # too-many-ancestors - it's too strict. # wrong-import-order - isort guards this @@ -49,7 +48,6 @@ disable= too-many-return-statements, too-many-statements, too-many-boolean-expressions, - unnecessary-pass, unused-argument, wrong-import-order enable= diff --git a/tests/components/smhi/test_weather.py b/tests/components/smhi/test_weather.py index 952e82c01be..3485a108d5b 100644 --- a/tests/components/smhi/test_weather.py +++ b/tests/components/smhi/test_weather.py @@ -74,11 +74,6 @@ async def test_setup_hass(hass: HomeAssistant, aioclient_mock) -> None: 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: """Test properties when no API data available.""" weather = weather_smhi.SmhiWeather("name", "10", "10") -- GitLab