mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Fix PyLint 1.6 issues (#2471)
This commit is contained in:
parent
978ebb9c59
commit
31b8e49ad2
@ -89,7 +89,7 @@ class WelcomeData(object):
|
||||
"""Return all module available on the API as a list."""
|
||||
self.update()
|
||||
if not self.home:
|
||||
for home in self.welcomedata.cameras.keys():
|
||||
for home in self.welcomedata.cameras:
|
||||
for camera in self.welcomedata.cameras[home].values():
|
||||
self.camera_names.append(camera['name'])
|
||||
else:
|
||||
|
@ -1,9 +1,9 @@
|
||||
"""Handle the frontend for Home Assistant."""
|
||||
import os
|
||||
|
||||
from . import version, mdi_version
|
||||
from homeassistant.components import api
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from . import version, mdi_version
|
||||
|
||||
DOMAIN = 'frontend'
|
||||
DEPENDENCIES = ['api']
|
||||
|
@ -64,7 +64,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
continue
|
||||
sensor_name = str(ts_sensor.id)
|
||||
|
||||
for datatype in sensor_value_descriptions.keys():
|
||||
for datatype in sensor_value_descriptions:
|
||||
if datatype & datatype_mask and ts_sensor.has_value(datatype):
|
||||
|
||||
sensor_info = sensor_value_descriptions[datatype]
|
||||
|
@ -68,7 +68,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
||||
dev = []
|
||||
for device in devices:
|
||||
for type_name in SENSOR_TYPES.keys():
|
||||
for type_name in SENSOR_TYPES:
|
||||
dev.append(ThinkingCleanerSensor(device, type_name,
|
||||
update_devices))
|
||||
|
||||
|
@ -133,7 +133,7 @@ class AcerSwitch(SwitchDevice):
|
||||
else:
|
||||
self._available = False
|
||||
|
||||
for key in self._attributes.keys():
|
||||
for key in self._attributes:
|
||||
msg = CMD_DICT.get(key, None)
|
||||
if msg:
|
||||
awns = self._write_read_format(msg)
|
||||
|
@ -47,7 +47,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
||||
dev = []
|
||||
for device in devices:
|
||||
for type_name in SWITCH_TYPES.keys():
|
||||
for type_name in SWITCH_TYPES:
|
||||
dev.append(ThinkingCleanerSwitch(device, type_name,
|
||||
update_devices))
|
||||
|
||||
|
@ -72,7 +72,6 @@ def color_RGB_to_xy(R, G, B):
|
||||
# taken from
|
||||
# https://github.com/benknight/hue-python-rgb-converter/blob/master/rgb_cie.py
|
||||
# Copyright (c) 2014 Benjamin Knight / MIT License.
|
||||
# pylint: disable=bad-builtin
|
||||
def color_xy_brightness_to_RGB(vX, vY, brightness):
|
||||
"""Convert from XYZ to RGB."""
|
||||
brightness /= 255.
|
||||
|
Loading…
x
Reference in New Issue
Block a user