Automatic fixes to Python files

check=True was manually set when return code was checked later
This commit is contained in:
Geoffrey Frogeye 2025-05-08 17:56:11 +02:00
parent a3f4c2a932
commit 34b545890d
7 changed files with 22 additions and 33 deletions

View file

@ -133,7 +133,7 @@ class Desk:
self._reset_estimations()
self.last_destination = None
self.fetch_callback: typing.Callable[["Desk"], None] | None = None
self.fetch_callback: typing.Callable[[Desk], None] | None = None
def _get_report(self) -> bytes:
raw = self._get(4)
@ -170,9 +170,8 @@ class Desk:
if start_val < self.destination:
end_val = start_val + delta_u
return min(end_val, self.destination)
else:
end_val = start_val - delta_u
return max(end_val, self.destination)
end_val = start_val - delta_u
return max(end_val, self.destination)
self.est_value_bot = move_closer(self.est_value_bot)
self.est_value_top = move_closer(self.est_value_top)
@ -260,8 +259,7 @@ class Desk:
def get_height(self) -> float | None:
if self.est_value is None:
return None
else:
return self._unitToCm(self.est_value)
return self._unitToCm(self.est_value)
if __name__ == "__main__":