Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PLR1714 #239

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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