Skip to content

Commit

Permalink
Enable pylint unnecessary-pass (#33650)
Browse files Browse the repository at this point in the history
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
  • Loading branch information
frenck authored Apr 5, 2020
1 parent 000ad25 commit 7653dc9
Show file tree
Hide file tree
Showing 79 changed files with 0 additions and 349 deletions.
1 change: 0 additions & 1 deletion homeassistant/auth/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ async def async_user_meta_for_credentials(

async def async_initialize(self) -> None:
"""Initialize the auth provider."""
pass


async def auth_provider_from_config(
Expand Down
4 changes: 0 additions & 4 deletions homeassistant/components/adguard/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/alexa/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ def get_interface(self, capability):
Raises _UnsupportedInterface.
"""
pass

def interfaces(self):
"""Return a list of supported interfaces.
Expand Down
5 changes: 0 additions & 5 deletions homeassistant/components/auth/indieauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions homeassistant/components/cast/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ def new_connection_status(self, connection_status):
@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."""
Expand All @@ -182,7 +181,6 @@ def removed_from_multizone(self, group_uuid):

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."""
Expand Down Expand Up @@ -224,7 +222,6 @@ def __init__(self, cast_device, chromecast, mz_mgr):

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."""
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/citybikes/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@
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."""
Expand Down
10 changes: 0 additions & 10 deletions homeassistant/components/cover/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,13 @@ def current_cover_position(self):
None is unknown, 0 is closed, 100 is fully open.
"""
pass

@property
def current_cover_tilt_position(self):
"""Return current position of cover tilt.
None is unknown, 0 is closed, 100 is fully open.
"""
pass

@property
def state(self):
Expand Down Expand Up @@ -223,12 +221,10 @@ def supported_features(self):
@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):
Expand Down Expand Up @@ -267,39 +263,34 @@ async def async_toggle(self, **kwargs):

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."""
await self.hass.async_add_job(ft.partial(self.set_cover_position, **kwargs))

def stop_cover(self, **kwargs):
"""Stop the cover."""
pass

async def async_stop_cover(self, **kwargs):
"""Stop the cover."""
await self.hass.async_add_job(ft.partial(self.stop_cover, **kwargs))

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."""
await self.hass.async_add_job(ft.partial(self.open_cover_tilt, **kwargs))

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."""
await self.hass.async_add_job(ft.partial(self.close_cover_tilt, **kwargs))

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."""
Expand All @@ -309,7 +300,6 @@ async def async_set_cover_tilt_position(self, **kwargs):

def stop_cover_tilt(self, **kwargs):
"""Stop the cover."""
pass

async def async_stop_cover_tilt(self, **kwargs):
"""Stop the cover."""
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/daikin/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/daikin/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/daikin/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/fan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ async def async_turn_on(self, speed: Optional[str] = None, **kwargs):

def oscillate(self, oscillating: bool) -> None:
"""Oscillate the fan."""
pass

async def async_oscillate(self, oscillating: bool):
"""Oscillate the fan."""
Expand Down
4 changes: 0 additions & 4 deletions homeassistant/components/fibaro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,6 @@ def should_poll(self):
"""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."""
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/fronius/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ async def async_update(self):

async def _update(self):
"""Return values of interest."""
pass

async def register(self, sensor):
"""Register child sensor for update subscriptions."""
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,9 @@ def get_info(self):

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."""
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/homekit/accessories.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ def __init__(self, hass, driver, name):

def setup_message(self):
"""Prevent print of pyhap setup message to terminal."""
pass


class HomeDriver(AccessoryDriver):
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/huawei_lte/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ async def async_update(self) -> None:

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."""
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/hue/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/icloud/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/incomfort/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,3 @@ async def async_set_temperature(self, **kwargs) -> None:

async def async_set_hvac_mode(self, hvac_mode: str) -> None:
"""Set new target hvac mode."""
pass
1 change: 0 additions & 1 deletion homeassistant/components/isy994/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ def on_update(self, event: object) -> None:
We listen directly to the Control events for this device.
"""
pass

@property
def value(self) -> object:
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/mailbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ async def async_delete(self, msgid):
class StreamError(Exception):
"""Media streaming exception."""

pass


class MailboxView(HomeAssistantView):
"""Base mailbox view."""
Expand Down
4 changes: 0 additions & 4 deletions homeassistant/components/media_extractor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ def play_media(call):
class MEDownloadException(Exception):
"""Media extractor download exception."""

pass


class MEQueryException(Exception):
"""Media extractor query exception."""

pass


class MediaExtractor:
"""Class which encapsulates all extraction logic."""
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/mqtt/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions homeassistant/components/openuv/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 0 additions & 8 deletions homeassistant/components/plex/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@
_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]
Expand Down
8 changes: 0 additions & 8 deletions homeassistant/components/plex/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
_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]
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/point/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ async def async_will_remove_from_hass(self):

async def _update_callback(self):
"""Update the value of the sensor."""
pass

@property
def available(self):
Expand Down
3 changes: 0 additions & 3 deletions homeassistant/components/python_script/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@
class ScriptError(HomeAssistantError):
"""When a script error occurs."""

pass


def setup(hass, config):
"""Initialize the Python script component."""
Expand Down Expand Up @@ -216,7 +214,6 @@ class StubPrinter:

def __init__(self, _getattr_):
"""Initialize our printer."""
pass

def _call_print(self, *objects, **kwargs):
"""Print text."""
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/rflink/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ async def add_new_device(event):
class RflinkLight(SwitchableRflinkDevice, Light):
"""Representation of a Rflink light."""

pass


class DimmableRflinkLight(SwitchableRflinkDevice, Light):
"""Rflink light device that support dimming."""
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/rflink/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion homeassistant/components/roku/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def update(self):
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."""
Expand Down
1 change: 0 additions & 1 deletion homeassistant/components/roku/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def update(self):
self._available = True
except (RequestsConnectionError, RequestsReadTimeout, RokuException):
self._available = False
pass

@property
def name(self):
Expand Down
Loading

0 comments on commit 7653dc9

Please sign in to comment.