quickie.factories.task
- quickie.factories.task(obj: Callable) Task
- quickie.factories.task(**kwargs: Unpack[CommonTaskKwargs]) PartialReturnType[Task]
Create a task from a function.
@task(name="hello") def hello_task(): console.print("Hello, task!") @task def hello_world(): """Docstring will be used as help text.""" print("Hello, world!")
- Parameters:
obj – The function to create the task from.
kwargs – Common keyword arguments for tasks. See CommonTaskKwargs for more information.
- Returns:
The task class, or, if obj is None, a partial function to be used as a decorator for a function.