Skip to content

Commit

Permalink
Fix PLR1714 (#239)
Browse files Browse the repository at this point in the history
Signed-off-by: Joostlek <[email protected]>
  • Loading branch information
joostlek authored Feb 21, 2024
1 parent 475bf2c commit 9687fe1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ ignore = [
"PLE1205",
"PLR2004", # Just annoying, not really useful
"PLR0912",
"PLR1714",
"PLW2901",
"RET507",
"SIM102",
Expand Down
14 changes: 6 additions & 8 deletions roombapy/roomba.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,8 @@ def update_state_machine(self, new_state=None):
]
== "none"
and self.cleanMissionStatus_phase == "charge"
and (
self.current_state == ROOMBA_STATES["pause"]
or self.current_state == ROOMBA_STATES["recharge"]
)
and self.current_state
in (ROOMBA_STATES["pause"], ROOMBA_STATES["recharge"])
):
self.current_state = ROOMBA_STATES["cancelled"]
except KeyError:
Expand Down Expand Up @@ -430,14 +428,14 @@ def update_state_machine(self, new_state=None):
# so that we will draw map and can update charge status
current_mission = None
elif (
self.current_state == ROOMBA_STATES["stop"]
or self.current_state == ROOMBA_STATES["pause"]
self.current_state
in (ROOMBA_STATES["stop"], ROOMBA_STATES["pause"])
) and self.cleanMissionStatus_phase == "hmUsrDock":
self.current_state = ROOMBA_STATES["cancelled"]
elif (
(
self.current_state == ROOMBA_STATES["hmUsrDock"]
or self.current_state == ROOMBA_STATES["cancelled"]
self.current_state
in (ROOMBA_STATES["hmUsrDock"], ROOMBA_STATES["cancelled"])
)
and self.cleanMissionStatus_phase == "charge"
or (
Expand Down

0 comments on commit 9687fe1

Please sign in to comment.