Fix PyLint 1.6 issues (#2471)

This commit is contained in:
Paulus Schoutsen 2016-07-07 18:54:16 -07:00 committed by GitHub
parent 978ebb9c59
commit 31b8e49ad2
7 changed files with 6 additions and 7 deletions

View File

@ -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:

View File

@ -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']

View File

@ -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]

View File

@ -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))

View File

@ -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)

View File

@ -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))

View File

@ -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.