Upgrade pylint to 2.2.2 (#18750)
* Upgrade to 2.2.0 * simplifiable-if-expression fixes * duplicate-string-formatting-argument fixes * unused-import fixes * Upgrade to 2.2.1 * Remove no longer needed disable * Upgrade to 2.2.2
This commit is contained in:
1 parent
04c7d5c128
commit
1be440a72b
19 files changed
+35
-40
No files matched your search
@@ -179,10 +179,8 @@ def _setup_bme680(config):
|
||||
|
||||
sensor_handler = BME680Handler(
|
||||
sensor,
|
||||
True if (
|
||||
SENSOR_GAS in config[CONF_MONITORED_CONDITIONS] or
|
||||
SENSOR_AQ in config[CONF_MONITORED_CONDITIONS]
|
||||
) else False,
|
||||
(SENSOR_GAS in config[CONF_MONITORED_CONDITIONS] or
|
||||
SENSOR_AQ in config[CONF_MONITORED_CONDITIONS]),
|
||||
config[CONF_AQ_BURN_IN_TIME],
|
||||
config[CONF_AQ_HUM_BASELINE],
|
||||
config[CONF_AQ_HUM_WEIGHTING]
|
||||
|
||||
@@ -55,7 +55,7 @@ async def async_setup_platform(hass, config, async_add_entities,
|
||||
"""Set up the MiFlora sensor."""
|
||||
from miflora import miflora_poller
|
||||
try:
|
||||
import bluepy.btle # noqa: F401 pylint: disable=unused-variable
|
||||
import bluepy.btle # noqa: F401 pylint: disable=unused-import
|
||||
from btlewrap import BluepyBackend
|
||||
backend = BluepyBackend
|
||||
except ImportError:
|
||||
|
||||
@@ -60,7 +60,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the MiTempBt sensor."""
|
||||
from mitemp_bt import mitemp_bt_poller
|
||||
try:
|
||||
import bluepy.btle # noqa: F401 pylint: disable=unused-variable
|
||||
import bluepy.btle # noqa: F401 pylint: disable=unused-import
|
||||
from btlewrap import BluepyBackend
|
||||
backend = BluepyBackend
|
||||
except ImportError:
|
||||
|
||||
@@ -147,10 +147,10 @@ class MVGLiveData:
|
||||
self._products = products
|
||||
self._timeoffset = timeoffset
|
||||
self._number = number
|
||||
self._include_ubahn = True if 'U-Bahn' in self._products else False
|
||||
self._include_tram = True if 'Tram' in self._products else False
|
||||
self._include_bus = True if 'Bus' in self._products else False
|
||||
self._include_sbahn = True if 'S-Bahn' in self._products else False
|
||||
self._include_ubahn = 'U-Bahn' in self._products
|
||||
self._include_tram = 'Tram' in self._products
|
||||
self._include_bus = 'Bus' in self._products
|
||||
self._include_sbahn = 'S-Bahn' in self._products
|
||||
self.mvg = MVGLive.MVGLive()
|
||||
self.departures = []
|
||||
|
||||
|
||||
@@ -80,8 +80,7 @@ class StatisticsSensor(Entity):
|
||||
precision):
|
||||
"""Initialize the Statistics sensor."""
|
||||
self._entity_id = entity_id
|
||||
self.is_binary = True if self._entity_id.split('.')[0] == \
|
||||
'binary_sensor' else False
|
||||
self.is_binary = self._entity_id.split('.')[0] == 'binary_sensor'
|
||||
if not self.is_binary:
|
||||
self._name = '{} {}'.format(name, ATTR_MEAN)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user