Skip to content

Commit 447ffe7

Browse files
fix formating
1 parent cd9d1cf commit 447ffe7

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

commands2/cmd.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,17 @@ def startRun(
110110
start, run, lambda interrupt: None, lambda: False, *requirements
111111
)
112112

113+
113114
def startRunEnd(
114-
start: Callable[[], Any], run: Callable[[], Any], end: Callable[[], Any],
115-
*requirements: Subsystem) -> Command:
115+
start: Callable[[], Any],
116+
run: Callable[[], Any],
117+
end: Callable[[], Any],
118+
*requirements: Subsystem
119+
) -> Command:
116120
"""
117-
Constructs a command that runs an action once, and then runs an action every iteration until interrupted,
121+
Constructs a command that runs an action once, and then runs an action every iteration until interrupted,
118122
and then runs a third action.
119-
123+
120124
:param start the action to run on start
121125
:param run the action to run every iteration
122126
:param end the action to run on interrupt
@@ -126,6 +130,7 @@ def startRunEnd(
126130
start, run, lambda interrupted: end(), lambda: False, *requirements
127131
)
128132

133+
129134
def print_(message: str) -> Command:
130135
"""
131136
Constructs a command that prints a message and finishes.

commands2/subsystem.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,18 @@ def startRun(self, start: Callable[[], None], run: Callable[[], None]) -> Comman
168168

169169
return startRun(start, run, self)
170170

171-
def startRunEnd(self, start: Callable[[], None], run: Callable[[], None], end: Callable[[], None]) -> Command:
171+
def startRunEnd(
172+
self,
173+
start: Callable[[], None],
174+
run: Callable[[], None],
175+
end: Callable[[], None],
176+
) -> Command:
172177
"""
173178
Constructs a command that runs an action once, and then runs an action
174179
every iteration until interrupted, and then runs a third action.
175-
every iteration until interrupted, and then runs a third action. Requires
180+
every iteration until interrupted, and then runs a third action. Requires
176181
this subsystem.
177-
182+
178183
:param start the action to run on start
179184
:param run the action to run every iteration
180185
:param end the action to run on interrupt

0 commit comments

Comments
 (0)