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
@@ -123,7 +123,7 @@ class I2CHatSwitch(ToggleEntity):
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn the device on."""
|
||||
try:
|
||||
state = True if self._invert_logic is False else False
|
||||
state = self._invert_logic is False
|
||||
self.I2C_HATS_MANAGER.write_dq(self._address, self._channel, state)
|
||||
self.schedule_update_ha_state()
|
||||
except I2CHatsException as ex:
|
||||
@@ -132,7 +132,7 @@ class I2CHatSwitch(ToggleEntity):
|
||||
def turn_off(self, **kwargs):
|
||||
"""Turn the device off."""
|
||||
try:
|
||||
state = False if self._invert_logic is False else True
|
||||
state = self._invert_logic is not False
|
||||
self.I2C_HATS_MANAGER.write_dq(self._address, self._channel, state)
|
||||
self.schedule_update_ha_state()
|
||||
except I2CHatsException as ex:
|
||||
|
||||
Reference in new issue
Block a user