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:
"""Initialize the auth provider."""
pass
async def auth_provider_from_config(

View File

@ -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(

View File

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

View File

@ -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

View File

@ -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."""

View File

@ -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."""

View File

@ -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."""

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
config. But even in that case it would have been ignored.
"""
pass
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
config. But even in that case it would have been ignored.
"""
pass
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
config. But even in that case it would have been ignored.
"""
pass
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:
"""Oscillate the fan."""
pass
async def async_oscillate(self, oscillating: bool):
"""Oscillate the fan."""

View File

@ -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."""

View File

@ -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."""

View File

@ -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."""

View File

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

View File

@ -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."""

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
config. But even in that case it would have been ignored.
"""
pass
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
):
"""Old way of setting up the iCloud tracker."""
pass
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:
"""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.
"""
pass
@property
def value(self) -> object:

View File

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

View File

@ -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."""

View File

@ -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

View File

@ -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(

View File

@ -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]

View File

@ -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]

View File

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

View File

@ -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."""

View File

@ -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."""

View File

@ -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

View File

@ -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."""

View File

@ -43,7 +43,6 @@ class RokuRemote(RemoteDevice):
self._available = True
except (RequestsConnectionError, RequestsReadTimeout, RokuException):
self._available = False
pass
@property
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):
"""Set up the Samsung TV from a config entry."""
ip_address = config_entry.data[CONF_IP_ADDRESS]

View File

@ -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."""

View File

@ -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:

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):
"""Representation of a Soma cover device."""

View File

@ -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."""

View File

@ -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."""

View File

@ -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."""

View File

@ -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."""

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):
"""Set up tellduslive sensors dynamically."""

View File

@ -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."""

View File

@ -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

View File

@ -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."""

View File

@ -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."""

View File

@ -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

View File

@ -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."""

View File

@ -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

View File

@ -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

View File

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

View File

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

View File

@ -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."""

View File

@ -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."""

View File

@ -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",

View File

@ -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."""

View File

@ -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."""

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -20,5 +20,3 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
class ZigBeeBinarySensor(ZigBeeDigitalIn, BinarySensorDevice):
"""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):
"""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):
"""Representation of a Zigbee Digital Out device."""
pass

View File

@ -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):

View File

@ -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."""

View File

@ -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

View File

@ -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]:

View File

@ -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:

View File

@ -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

View File

@ -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=

View File

@ -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")