Disable too-many-* (#4107)

* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
This commit is contained in:
Fabian Affolter authored and GitHub committed 2016-10-30 22:18:53 +01:00
1 parent b910a9917d
commit be272ac64a
298 files changed
+271 -570

No files matched your search

@@ -110,7 +110,6 @@ class PwrCtrlSwitch(SwitchDevice):
self._port.off()
# pylint: disable=too-few-public-methods
class PwrCtrlDevice(object):
"""Device representation for per device throttling."""
@@ -60,11 +60,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
add_devices(switches)
# pylint: disable=too-many-instance-attributes
class CommandSwitch(SwitchDevice):
"""Representation a switch that can be toggled using shell commands."""
# pylint: disable=too-many-arguments
def __init__(self, hass, name, command_on, command_off,
command_state, value_template):
"""Initialize the switch."""
-3
View File
@@ -102,11 +102,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
hass.services.register(DOMAIN, name + '_update', update)
# pylint: disable=too-many-instance-attributes
class FluxSwitch(SwitchDevice):
"""Representation of a Flux switch."""
# pylint: disable=too-many-arguments
def __init__(self, name, hass, state, lights, start_time, stop_time,
start_colortemp, sunset_colortemp, stop_colortemp,
brightness, mode):
@@ -150,7 +148,6 @@ class FluxSwitch(SwitchDevice):
self._state = False
self.update_ha_state()
# pylint: disable=too-many-locals
def flux_update(self, now=None):
"""Update all the lights using flux."""
if now is None:
@@ -33,8 +33,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
})
# pylint: disable=too-many-arguments
# pylint: disable=too-many-instance-attributes
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup Hikvision camera."""
import hikvision.api
@@ -43,7 +43,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class ModbusCoilSwitch(ToggleEntity):
"""Representation of a Modbus switch."""
# pylint: disable=too-many-arguments
def __init__(self, name, slave, coil):
"""Initialize the switch."""
self._name = name
-1
View File
@@ -54,7 +54,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
)])
# pylint: disable=too-many-arguments, too-many-instance-attributes
class MqttSwitch(SwitchDevice):
"""Representation of a switch that can be toggled using MQTT."""
@@ -37,7 +37,6 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
class PilightSwitch(SwitchDevice):
"""Representation of a pilight switch."""
# pylint: disable=too-many-arguments, too-many-instance-attributes
def __init__(self, hass, name, code_on, code_off,
code_on_receive, code_off_receive):
"""Initialize the switch."""
@@ -141,7 +141,6 @@ class PAServer():
return -1
# pylint: disable=too-many-arguments
class PALoopbackSwitch(SwitchDevice):
"""Representation the presence or absence of a PA loopback module."""
+2 -4
View File
@@ -65,13 +65,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
hass, name, resource, body_on, body_off, is_on_template, timeout)])
# pylint: disable=too-many-arguments
class RestSwitch(SwitchDevice):
"""Representation of a switch that can be toggled using REST."""
# pylint: disable=too-many-instance-attributes
def __init__(self, hass, name, resource, body_on, body_off, is_on_template,
timeout):
def __init__(self, hass, name, resource, body_on, body_off,
is_on_template, timeout):
"""Initialize the REST switch."""
self._state = None
self._hass = hass
@@ -68,7 +68,6 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class RPiRFSwitch(SwitchDevice):
"""Representation of a GPIO RF switch."""
# pylint: disable=too-many-arguments, too-many-instance-attributes
def __init__(self, hass, name, rfdevice, protocol, pulselength,
code_on, code_off):
"""Initialize the switch."""
@@ -77,7 +77,6 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
class SwitchTemplate(SwitchDevice):
"""Representation of a Template switch."""
# pylint: disable=too-many-arguments
def __init__(self, hass, device_id, friendly_name, state_template,
on_action, off_action, entity_ids):
"""Initialize the Template switch."""