Pylint cleanups (#15626)

* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
This commit is contained in:
Ville Skyttä authored and Paulus Schoutsen committed 2018-07-23 10:16:05 +02:00
1 parent a38c0d6d15
commit b7c336a687
166 files changed
+425 -490

No files matched your search

+6 -6
View File
@@ -51,17 +51,17 @@ class MoonSensor(Entity):
"""Return the state of the device."""
if self._state == 0:
return 'new_moon'
elif self._state < 7:
if self._state < 7:
return 'waxing_crescent'
elif self._state == 7:
if self._state == 7:
return 'first_quarter'
elif self._state < 14:
if self._state < 14:
return 'waxing_gibbous'
elif self._state == 14:
if self._state == 14:
return 'full_moon'
elif self._state < 21:
if self._state < 21:
return 'waning_gibbous'
elif self._state == 21:
if self._state == 21:
return 'last_quarter'
return 'waning_crescent'