Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty committed Jun 24, 2024
1 parent 85f6bbd commit 5cf5abd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands2/button/trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def onChange(self, command: Command) -> Self:
def _():
pressed = self._condition()

if state.pressed_last != pressed:
if state.pressed_last not pressed:

Check failure on line 139 in commands2/button/trigger.py

View workflow job for this annotation

GitHub Actions / check-mypy

invalid syntax
command.schedule()

state.pressed_last = pressed
Expand Down
2 changes: 1 addition & 1 deletion tests/test_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_onChange(scheduler: commands2.CommandScheduler):
assert command1.isScheduled()
finished.set(True)
scheduler.run()
assert command1.isScheduled()
assert not command1.isScheduled()


def test_whileTrueRepeatedly(scheduler: commands2.CommandScheduler):
Expand Down

0 comments on commit 5cf5abd

Please sign in to comment.