mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Remove globally disabled pylint issues (#8005)
This commit is contained in:
parent
7fae8cd0f1
commit
9189cbdc8b
@ -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]])
|
for data in disc_info[CONF_ENTITIES] if data[CONF_TRACK]])
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=too-many-instance-attributes
|
|
||||||
class GoogleCalendarEventDevice(CalendarEventDevice):
|
class GoogleCalendarEventDevice(CalendarEventDevice):
|
||||||
"""A calendar event device."""
|
"""A calendar event device."""
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
add_devices([WinkAC(climate, hass, temp_unit)])
|
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):
|
class WinkThermostat(WinkDevice, ClimateDevice):
|
||||||
"""Representation of a Wink thermostat."""
|
"""Representation of a Wink thermostat."""
|
||||||
|
|
||||||
|
@ -116,7 +116,6 @@ def async_setup_scanner(hass, config, async_see, discovery_info=None):
|
|||||||
"key for topic %s", topic)
|
"key for topic %s", topic)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# pylint: disable=too-many-return-statements
|
|
||||||
def validate_payload(topic, payload, data_type):
|
def validate_payload(topic, payload, data_type):
|
||||||
"""Validate the OwnTracks payload."""
|
"""Validate the OwnTracks payload."""
|
||||||
try:
|
try:
|
||||||
|
@ -108,7 +108,6 @@ def _retry(func):
|
|||||||
class SharpAquosTVDevice(MediaPlayerDevice):
|
class SharpAquosTVDevice(MediaPlayerDevice):
|
||||||
"""Representation of a Aquos TV."""
|
"""Representation of a Aquos TV."""
|
||||||
|
|
||||||
# pylint: disable=too-many-public-methods
|
|
||||||
def __init__(self, name, remote, power_on_enabled=False):
|
def __init__(self, name, remote, power_on_enabled=False):
|
||||||
"""Initialize the aquos device."""
|
"""Initialize the aquos device."""
|
||||||
global SUPPORT_SHARPTV
|
global SUPPORT_SHARPTV
|
||||||
|
@ -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)
|
track_utc_time_change(hass, lambda now: update_devices(), second=30)
|
||||||
|
|
||||||
@util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
|
@util.Throttle(MIN_TIME_BETWEEN_SCANS, MIN_TIME_BETWEEN_FORCED_SCANS)
|
||||||
# pylint: disable=too-many-branches
|
|
||||||
def update_devices():
|
def update_devices():
|
||||||
"""Update the devices objects."""
|
"""Update the devices objects."""
|
||||||
try:
|
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):
|
class PlexClient(MediaPlayerDevice):
|
||||||
"""Representation of a Plex device."""
|
"""Representation of a Plex device."""
|
||||||
|
|
||||||
# pylint: disable=too-many-arguments
|
|
||||||
def __init__(self, config, device, session, plex_sessions,
|
def __init__(self, config, device, session, plex_sessions,
|
||||||
update_devices, update_sessions):
|
update_devices, update_sessions):
|
||||||
"""Initialize the Plex device."""
|
"""Initialize the Plex device."""
|
||||||
@ -299,7 +296,6 @@ class PlexClient(MediaPlayerDevice):
|
|||||||
'media_player', prefix,
|
'media_player', prefix,
|
||||||
self.name.lower().replace('-', '_'))
|
self.name.lower().replace('-', '_'))
|
||||||
|
|
||||||
# pylint: disable=too-many-branches, too-many-statements
|
|
||||||
def refresh(self, device, session):
|
def refresh(self, device, session):
|
||||||
"""Refresh key device data."""
|
"""Refresh key device data."""
|
||||||
# new data refresh
|
# new data refresh
|
||||||
|
@ -7,7 +7,6 @@ https://home-assistant.io/components/sensor.openevse/
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from requests import RequestException
|
from requests import RequestException
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
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.const import CONF_MONITORED_VARIABLES
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
|
||||||
REQUIREMENTS = ['openevsewifi==0.4']
|
REQUIREMENTS = ['openevsewifi==0.4']
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
SENSOR_TYPES = {
|
SENSOR_TYPES = {
|
||||||
'status': ['Charging Status', None],
|
'status': ['Charging Status', None],
|
||||||
'charge_time': ['Charge Time Elapsed', 'minutes'],
|
'charge_time': ['Charge Time Elapsed', 'minutes'],
|
||||||
@ -54,7 +55,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
class OpenEVSESensor(Entity):
|
class OpenEVSESensor(Entity):
|
||||||
"""Implementation of an OpenEVSE sensor."""
|
"""Implementation of an OpenEVSE sensor."""
|
||||||
|
|
||||||
# pylint: disable=too-many-arguments
|
|
||||||
def __init__(self, sensor_type, charger):
|
def __init__(self, sensor_type, charger):
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
self._name = SENSOR_TYPES[sensor_type][0]
|
self._name = SENSOR_TYPES[sensor_type][0]
|
||||||
|
@ -62,7 +62,7 @@ def setup(hass, base_config):
|
|||||||
|
|
||||||
def stop_subscription(event):
|
def stop_subscription(event):
|
||||||
"""Shutdown Vera subscriptions and subscription thread on exit."""
|
"""Shutdown Vera subscriptions and subscription thread on exit."""
|
||||||
_LOGGER.info("Shutting down subscriptions.")
|
_LOGGER.info("Shutting down subscriptions")
|
||||||
VERA_CONTROLLER.stop()
|
VERA_CONTROLLER.stop()
|
||||||
|
|
||||||
config = base_config.get(DOMAIN)
|
config = base_config.get(DOMAIN)
|
||||||
@ -100,7 +100,6 @@ def setup(hass, base_config):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=too-many-return-statements
|
|
||||||
def map_vera_device(vera_device, remap):
|
def map_vera_device(vera_device, remap):
|
||||||
"""Map vera classes to Home Assistant types."""
|
"""Map vera classes to Home Assistant types."""
|
||||||
import pyvera as veraApi
|
import pyvera as veraApi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user