Skip to content

Commit 01a00c2

Browse files
committed
FIx.
1 parent 11f5647 commit 01a00c2

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

docs/source/reference_guides/api.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ For example:
136136

137137
```python
138138
@pytask.mark.timeout(10, "slow", method="thread")
139-
def task_function(): ...
139+
def task_function():
140+
...
140141
```
141142

142143
Will create and attach a {class}`Mark <pytask.Mark>` object to the collected
@@ -153,7 +154,8 @@ Example for using multiple custom markers:
153154
```python
154155
@pytask.mark.timeout(10, "slow", method="thread")
155156
@pytask.mark.slow
156-
def task_function(): ...
157+
def task_function():
158+
...
157159
```
158160

159161
### Classes

docs/source/tutorials/repeating_tasks_with_different_inputs.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ the {func}`@task <pytask.task>` decorator to pass keyword arguments to the task.
268268
for id_, kwargs in ID_TO_KWARGS.items():
269269

270270
@task(id=id_, kwargs=kwargs)
271-
def task_create_random_data(seed, produces): ...
271+
def task_create_random_data(seed, produces):
272+
...
272273
```
273274

274275
Writing a function that creates `ID_TO_KWARGS` would be even more pythonic.
@@ -288,7 +289,8 @@ ID_TO_KWARGS = create_parametrization()
288289
for id_, kwargs in ID_TO_KWARGS.items():
289290

290291
@task(id=id_, kwargs=kwargs)
291-
def task_create_random_data(i, produces): ...
292+
def task_create_random_data(i, produces):
293+
...
292294
```
293295

294296
The {doc}`best-practices guide on parametrizations <../how_to_guides/bp_scaling_tasks>`

docs/source/tutorials/selecting_tasks.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ from pytask import task
9191
for i in range(2):
9292

9393
@task
94-
def task_parametrized(i=i): ...
94+
def task_parametrized(i=i):
95+
...
9596
```
9697

9798
To run the task where `i = 1`, run this command.

docs/source/tutorials/skipping_tasks.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ from config import NO_LONG_RUNNING_TASKS
4444
@pytask.mark.skipif(NO_LONG_RUNNING_TASKS, reason="Skip long-running tasks.")
4545
def task_that_takes_really_long_to_run(
4646
path: Path = Path("time_intensive_product.pkl"),
47-
): ...
47+
):
48+
...
4849
```
4950

5051
## Further reading

docs/source/tutorials/write_a_task.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,16 @@ from pytask import task
117117

118118

119119
@task
120-
def create_random_data(): ...
120+
def create_random_data():
121+
...
121122

122123

123124
# The id will be ".../task_data_preparation.py::create_data".
124125

125126

126127
@task(name="create_data")
127-
def create_random_data(): ...
128+
def create_random_data():
129+
...
128130
```
129131

130132
## Customize task module names

0 commit comments

Comments
 (0)