Skip to content

Commit f80d3ef

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c001a9d commit f80d3ef

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

docs/source/reference_guides/api.md

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

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

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

161159
### Classes

docs/source/tutorials/repeating_tasks_with_different_inputs.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ 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):
272-
...
271+
def task_create_random_data(seed, produces): ...
273272
```
274273

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

291290
@task(id=id_, kwargs=kwargs)
292-
def task_create_random_data(i, produces):
293-
...
291+
def task_create_random_data(i, produces): ...
294292
```
295293

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

docs/source/tutorials/selecting_tasks.md

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

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

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

docs/source/tutorials/skipping_tasks.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ 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-
):
48-
...
47+
): ...
4948
```
5049

5150
## Further reading

docs/source/tutorials/write_a_task.md

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

118118

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

123122

124123
# The id will be ".../task_data_preparation.py::create_data".
125124

126125

127126
@task(name="create_data")
128-
def create_random_data():
129-
...
127+
def create_random_data(): ...
130128
```
131129

132130
## Customize task module names

0 commit comments

Comments
 (0)