From 9189cbdc8b5eb3352355641d78674d6d4a493c34 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 13 Jun 2017 11:10:32 +0200 Subject: [PATCH] Remove globally disabled pylint issues (#8005) --- homeassistant/components/calendar/google.py | 1 - homeassistant/components/climate/wink.py | 2 +- homeassistant/components/device_tracker/owntracks.py | 1 - homeassistant/components/media_player/aquostv.py | 1 - homeassistant/components/media_player/plex.py | 4 ---- homeassistant/components/sensor/openevse.py | 6 +++--- homeassistant/components/vera.py | 3 +-- 7 files changed, 5 insertions(+), 13 deletions(-) diff --git a/homeassistant/components/calendar/google.py b/homeassistant/components/calendar/google.py index 362202d1bde..67d2e7179ba 100644 --- a/homeassistant/components/calendar/google.py +++ b/homeassistant/components/calendar/google.py @@ -39,7 +39,6 @@ def setup_platform(hass, config, add_devices, disc_info=None): for data in disc_info[CONF_ENTITIES] if data[CONF_TRACK]]) -# pylint: disable=too-many-instance-attributes class GoogleCalendarEventDevice(CalendarEventDevice): """A calendar event device.""" diff --git a/homeassistant/components/climate/wink.py b/homeassistant/components/climate/wink.py index 1be7480a727..e3439bdfc74 100644 --- a/homeassistant/components/climate/wink.py +++ b/homeassistant/components/climate/wink.py @@ -45,7 +45,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): add_devices([WinkAC(climate, hass, temp_unit)]) -# pylint: disable=abstract-method,too-many-public-methods, too-many-branches +# pylint: disable=abstract-method class WinkThermostat(WinkDevice, ClimateDevice): """Representation of a Wink thermostat.""" diff --git a/homeassistant/components/device_tracker/owntracks.py b/homeassistant/components/device_tracker/owntracks.py index 40ab48b384a..2f41d8fe0d3 100644 --- a/homeassistant/components/device_tracker/owntracks.py +++ b/homeassistant/components/device_tracker/owntracks.py @@ -116,7 +116,6 @@ def async_setup_scanner(hass, config, async_see, discovery_info=None): "key for topic %s", topic) return None - # pylint: disable=too-many-return-statements def validate_payload(topic, payload, data_type): """Validate the OwnTracks payload.""" try: diff --git a/homeassistant/components/media_player/aquostv.py b/homeassistant/components/media_player/aquostv.py index 2d51cacadff..ae6d9e04643 100644 --- a/homeassistant/components/media_player/aquostv.py +++ b/homeassistant/components/media_player/aquostv.py @@ -108,7 +108,6 @@ def _retry(func): class SharpAquosTVDevice(MediaPlayerDevice): """Representation of a Aquos TV.""" - # pylint: disable=too-many-public-methods def __init__(self, name, remote, power_on_enabled=False): """Initialize the aquos device.""" global SUPPORT_SHARPTV diff --git a/homeassistant/components/media_player/plex.py b/homeassistant/components/media_player/plex.py index e2f322a8ec8..f4b0ca1c0d6 100644 --- a/homeassistant/components/media_player/plex.py +++ b/homeassistant/components/media_player/plex.py @@ -134,7 +134,6 @@ def setup_plexserver(host, token, hass, config, add_devices_callback): track_utc_time_change(hass, lambda now: update_devices(), second=30) @util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS) - # pylint: disable=too-many-branches def update_devices(): """Update the devices objects.""" try: @@ -231,11 +230,9 @@ def request_configuration(host, hass, config, add_devices_callback): }]) -# pylint: disable=too-many-instance-attributes, too-many-public-methods class PlexClient(MediaPlayerDevice): """Representation of a Plex device.""" - # pylint: disable=too-many-arguments def __init__(self, config, device, session, plex_sessions, update_devices, update_sessions): """Initialize the Plex device.""" @@ -299,7 +296,6 @@ class PlexClient(MediaPlayerDevice): 'media_player', prefix, self.name.lower().replace('-', '_')) - # pylint: disable=too-many-branches, too-many-statements def refresh(self, device, session): """Refresh key device data.""" # new data refresh diff --git a/homeassistant/components/sensor/openevse.py b/homeassistant/components/sensor/openevse.py index 8751dda83fd..f3b12506c84 100644 --- a/homeassistant/components/sensor/openevse.py +++ b/homeassistant/components/sensor/openevse.py @@ -7,7 +7,6 @@ https://home-assistant.io/components/sensor.openevse/ import logging from requests import RequestException - import voluptuous as vol import homeassistant.helpers.config_validation as cv @@ -16,8 +15,10 @@ from homeassistant.const import TEMP_CELSIUS, CONF_HOST from homeassistant.const import CONF_MONITORED_VARIABLES from homeassistant.helpers.entity import Entity -_LOGGER = logging.getLogger(__name__) REQUIREMENTS = ['openevsewifi==0.4'] + +_LOGGER = logging.getLogger(__name__) + SENSOR_TYPES = { 'status': ['Charging Status', None], 'charge_time': ['Charge Time Elapsed', 'minutes'], @@ -54,7 +55,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None): class OpenEVSESensor(Entity): """Implementation of an OpenEVSE sensor.""" - # pylint: disable=too-many-arguments def __init__(self, sensor_type, charger): """Initialize the sensor.""" self._name = SENSOR_TYPES[sensor_type][0] diff --git a/homeassistant/components/vera.py b/homeassistant/components/vera.py index a49c385bdc0..00b2421bdd5 100644 --- a/homeassistant/components/vera.py +++ b/homeassistant/components/vera.py @@ -62,7 +62,7 @@ def setup(hass, base_config): def stop_subscription(event): """Shutdown Vera subscriptions and subscription thread on exit.""" - _LOGGER.info("Shutting down subscriptions.") + _LOGGER.info("Shutting down subscriptions") VERA_CONTROLLER.stop() config = base_config.get(DOMAIN) @@ -100,7 +100,6 @@ def setup(hass, base_config): return True -# pylint: disable=too-many-return-statements def map_vera_device(vera_device, remap): """Map vera classes to Home Assistant types.""" import pyvera as veraApi