Pylint 2 fixes (#15487)

* pylint 2 inline disable syntax fixes

* pylint 2 logging-not-lazy fixes

* pylint 2 consider-using-in fixes

* Revert pylint 2 inline disable syntax fixes addressing unused-imports

Will have a go at removing more unused imports altogether first.
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2018-07-17 19:34:29 +02:00
1 parent d2f4bce6c0
commit e31dd4404e
33 files changed
+55 -73

No files matched your search

+1 -1
View File
@@ -107,7 +107,7 @@ class OctoPrintSensor(Entity):
def state(self):
"""Return the state of the sensor."""
sensor_unit = self.unit_of_measurement
if sensor_unit == TEMP_CELSIUS or sensor_unit == "%":
if sensor_unit in (TEMP_CELSIUS, "%"):
# API sometimes returns null and not 0
if self._state is None:
self._state = 0