@@ -266,6 +266,34 @@ def deadlineWith(self, *parallel: Command) -> ParallelDeadlineGroup:
266
266
command ends and interrupting all the others. Often more convenient/less-verbose than
267
267
constructing a new ParallelDeadlineGroup explicitly.
268
268
269
+ .. note:: This decorator works by adding this command to a composition.
270
+ The command the decorator was called on cannot be scheduled
271
+ independently or be added to a different composition (namely,
272
+ decorators), unless it is manually cleared from the list of composed
273
+ commands with :func:`commands2.CommandScheduler.removeComposedCommand`.
274
+ The command composition returned from this method can be further
275
+ decorated without issue.
276
+
277
+ :param parallel: the commands to run in parallel
278
+ :returns: the decorated command
279
+ """
280
+ import warnings
281
+ warnings .warn (
282
+ "deadlineWith is deprecated use deadlineFor instead" ,
283
+ DeprecationWarning ,
284
+ stacklevel = 2 ,
285
+ )
286
+
287
+ from .paralleldeadlinegroup import ParallelDeadlineGroup
288
+
289
+ return ParallelDeadlineGroup (self , * parallel )
290
+
291
+ def deadlineFor (self , * parallel : Command ) -> ParallelDeadlineGroup :
292
+ """
293
+ Decorates this command with a set of commands to run parallel to it, ending when the calling
294
+ command ends and interrupting all the others. Often more convenient/less-verbose than
295
+ constructing a new ParallelDeadlineGroup explicitly.
296
+
269
297
.. note:: This decorator works by adding this command to a composition.
270
298
The command the decorator was called on cannot be scheduled
271
299
independently or be added to a different composition (namely,
0 commit comments