Skip to content

Commit

Permalink
fix new lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tillsteinbach committed Sep 3, 2023
1 parent 6566168 commit 9754d5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions weconnect/elements/controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ def update(self): # noqa: C901
localAddress='windowheating', parent=self, value=ControlOperation.NONE, valueType=ControlOperation,
valueSetter=self.__setWindowHeatingControlChange)
elif isinstance(status, AccessStatus) and not status.error.enabled and self.vehicle.weConnect.spin is not None \
and type(self.vehicle.weConnect.spin) != bool:
and type(self.vehicle.weConnect.spin) is not bool:
if self.accessControl is None:
self.accessControl = ChangeableAttribute(
localAddress='access', parent=self, value=AccessControlOperation.NONE, valueType=AccessControlOperation,
valueSetter=self.__setAccessControlChange)
elif isinstance(status, AuxiliaryHeatingTimer) and not status.error.enabled and self.vehicle.weConnect.spin is not None \
and type(self.vehicle.weConnect.spin) != bool:
and type(self.vehicle.weConnect.spin) is not bool:
if self.accessControl is None:
self.auxiliaryHeating = ChangeableAttribute(
localAddress='auxiliaryHeating', parent=self, value=ControlOperation.NONE, valueType=(ControlOperation, int),
Expand Down Expand Up @@ -240,7 +240,7 @@ def __setAuxiliaryHeatingChange(self, value): # noqa: C901
duration = int(value)
else:
raise ControlError('Could not control auxiliary heating, control argument %s cannot be understood', value)
if self.vehicle.weConnect.spin is None or type(self.vehicle.weConnect.spin) != str:
if self.vehicle.weConnect.spin is None or type(self.vehicle.weConnect.spin) is not str:
raise ControlError('Could not control access, control operation needs an S-PIN')
spin = self.vehicle.weConnect.spin

Expand Down Expand Up @@ -311,7 +311,7 @@ def __setAccessControlChange(self, value): # noqa: C901
control = value
else:
raise ControlError('Could not control access, control argument %s cannot be understood', value)
if self.vehicle.weConnect.spin is None or type(self.vehicle.weConnect.spin) != str:
if self.vehicle.weConnect.spin is None or type(self.vehicle.weConnect.spin) is not str:
raise ControlError('Could not control access, control operation needs an S-PIN')
spin = self.vehicle.weConnect.spin

Expand Down

0 comments on commit 9754d5c

Please sign in to comment.