|
15 | 15 | from .sequentialcommandgroup import SequentialCommandGroup |
16 | 16 | from .paralleldeadlinegroup import ParallelDeadlineGroup |
17 | 17 | from .parallelcommandgroup import ParallelCommandGroup |
18 | | - from .perpetualcommand import PerpetualCommand |
19 | 18 | from .repeatcommand import RepeatCommand |
20 | 19 | from .proxycommand import ProxyCommand |
21 | 20 | from .conditionalcommand import ConditionalCommand |
@@ -341,27 +340,6 @@ def raceWith(self, *parallel: Command) -> ParallelRaceGroup: |
341 | 340 |
|
342 | 341 | return ParallelRaceGroup(self, *parallel) |
343 | 342 |
|
344 | | - def perpetually(self) -> PerpetualCommand: |
345 | | - """ |
346 | | - Decorates this command to run perpetually, ignoring its ordinary end conditions. The decorated |
347 | | - command can still be interrupted or canceled. |
348 | | -
|
349 | | - Note: This decorator works by adding this command to a composition. The command the |
350 | | - decorator was called on cannot be scheduled independently or be added to a different |
351 | | - composition (namely, decorators), unless it is manually cleared from the list of composed |
352 | | - commands with CommandScheduler#removeComposedCommand(Command). The command composition |
353 | | - returned from this method can be further decorated without issue. |
354 | | -
|
355 | | - :returns: the decorated command |
356 | | - @deprecated PerpetualCommand violates the assumption that execute() doesn't get called after |
357 | | - isFinished() returns true -- an assumption that should be valid. This was unsafe/undefined |
358 | | - behavior from the start, and RepeatCommand provides an easy way to achieve similar end |
359 | | - results with slightly different (and safe) semantics. |
360 | | - """ |
361 | | - from .perpetualcommand import PerpetualCommand |
362 | | - |
363 | | - return PerpetualCommand(self) |
364 | | - |
365 | 343 | def repeatedly(self) -> RepeatCommand: |
366 | 344 | """ |
367 | 345 | Decorates this command to run repeatedly, restarting it when it ends, until this command is |
|
0 commit comments