Skip to content

Commit ea09b35

Browse files
[pre-commit.ci] pre-commit autoupdate (#562)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tobias Raabe <raabe@posteo.de>
1 parent da7fa3f commit ea09b35

145 files changed

Lines changed: 368 additions & 369 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@ repos:
2424
- id: python-check-mock-methods
2525
- id: python-no-log-warn
2626
- id: text-unicode-replacement-char
27-
- repo: https://github.com/asottile/reorder-python-imports
28-
rev: v3.12.0
29-
hooks:
30-
- id: reorder-python-imports
31-
args: [--py38-plus, --add-import, 'from __future__ import annotations']
32-
exclude: ^(docs_src/)
33-
- repo: https://github.com/asottile/reorder-python-imports
34-
rev: v3.12.0
35-
hooks:
36-
- id: reorder-python-imports
37-
args: [--py38-plus]
38-
files: ^(docs_src/)
3927
# - repo: https://github.com/tox-dev/pyproject-fmt
4028
# rev: 1.2.0
4129
# hooks:
@@ -45,7 +33,7 @@ repos:
4533
hooks:
4634
- id: sort-all
4735
- repo: https://github.com/astral-sh/ruff-pre-commit
48-
rev: v0.2.0
36+
rev: v0.3.1
4937
hooks:
5038
- id: ruff-format
5139
- id: ruff
@@ -90,7 +78,7 @@ repos:
9078
]
9179
files: (docs/.)
9280
- repo: https://github.com/nbQA-dev/nbQA
93-
rev: 1.7.1
81+
rev: 1.8.4
9482
hooks:
9583
- id: nbqa-black
9684
- id: nbqa-isort

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
55
66
"""
7+
78
from __future__ import annotations
89

910
import inspect

docs/source/tutorials/making_tasks_persist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ in the database such that the subsequent execution will skip the task successful
1313

1414
## When is this useful?
1515

16-
- You ran a formatter like Black on the files in your project and want to prevent the
16+
- You ran a formatter like ruff on the files in your project and want to prevent the
1717
longest-running tasks from being rerun.
1818
- You extend a repetition of a task function but do not want to rerun all tasks.
1919
- You want to integrate a task that you have already run elsewhere. Copy over the

docs/source/tutorials/repeating_tasks_with_different_inputs.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,17 @@ auto-generated ids are used.
9393

9494
### Auto-generated ids
9595

96-
pytask construct ids by extending the task name with representations of the values used
96+
pytask constructs ids by extending the task name with representations of the values used
9797
for each iteration. Booleans, floats, integers, and strings enter the task id directly.
9898
For example, a task function that receives four arguments, `True`, `1.0`, `2`, and
99-
`"hello"`, one of each dtype, has the following id.
99+
`"hello"`, one of each data type, has the following id.
100100

101101
```
102102
task_data_preparation.py::task_create_random_data[True-1.0-2-hello]
103103
```
104104

105-
Arguments with other dtypes cannot be converted to strings and, thus, are replaced with
106-
a combination of the argument name and the iteration counter.
105+
Arguments with other data types cannot be converted to strings and, thus, are replaced
106+
with a combination of the argument name and the iteration counter.
107107

108108
For example, the following function is parametrized with tuples.
109109

@@ -136,7 +136,7 @@ For example, the following function is parametrized with tuples.
136136

137137
Since the tuples are not converted to strings, the ids of the two tasks are
138138

139-
```
139+
```text
140140
task_data_preparation.py::task_create_random_data[seed0]
141141
task_data_preparation.py::task_create_random_data[seed1]
142142
```
@@ -177,7 +177,7 @@ a unique name for the iteration.
177177

178178
produces these ids
179179

180-
```
180+
```text
181181
task_data_preparation.py::task_create_random_data[first]
182182
task_data_preparation.py::task_create_random_data[second]
183183
```

docs/source/tutorials/using_a_data_catalog.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The following tabs show you how to use the data catalog given the interface you
6161
````{tab-item} Python 3.10+
6262
:sync: python310plus
6363
64-
Use `data_catalog["key"]` as an default argument to access the
64+
Use `data_catalog["data"]` as an default argument to access the
6565
{class}`~pytask.PickleNode` within the task. When you are done transforming your
6666
{class}`~pandas.DataFrame`, save it with {meth}`~pytask.PickleNode.save`.
6767
@@ -74,7 +74,7 @@ Use `data_catalog["key"]` as an default argument to access the
7474
````{tab-item} Python 3.8+
7575
:sync: python38plus
7676
77-
Use `data_catalog["key"]` as an default argument to access the
77+
Use `data_catalog["data"]` as an default argument to access the
7878
{class}`~pytask.PickleNode` within the task. When you are done transforming your
7979
{class}`~pandas.DataFrame`, save it with {meth}`~pytask.PickleNode.save`.
8080
@@ -87,7 +87,7 @@ Use `data_catalog["key"]` as an default argument to access the
8787
````{tab-item} ​produces
8888
:sync: produces
8989
90-
Use `data_catalog["key"]` as an default argument to access the
90+
Use `data_catalog["data"]` as an default argument to access the
9191
{class}`~pytask.PickleNode` within the task. When you are done transforming your
9292
{class}`~pandas.DataFrame`, save it with {meth}`~pytask.PickleNode.save`.
9393
@@ -125,7 +125,7 @@ Following one of the interfaces gives you immediate access to the
125125
````{tab-item} Python 3.10+
126126
:sync: python310plus
127127
128-
Use `data_catalog["key"]` as an default argument to access the
128+
Use `data_catalog["data"]` as an default argument to access the
129129
{class}`~pytask.PickleNode` within the task. When you are done transforming your
130130
{class}`~pandas.DataFrame`, save it with {meth}`~pytask.PickleNode.save`.
131131
@@ -138,7 +138,7 @@ Use `data_catalog["key"]` as an default argument to access the
138138
````{tab-item} Python 3.8+
139139
:sync: python38plus
140140
141-
Use `data_catalog["key"]` as an default argument to access the
141+
Use `data_catalog["data"]` as an default argument to access the
142142
{class}`~pytask.PickleNode` within the task. When you are done transforming your
143143
{class}`~pandas.DataFrame`, save it with {meth}`~pytask.PickleNode.save`.
144144

docs_src/how_to_guides/bp_scaling_tasks_1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from my_project.config import BLD
55
from my_project.config import SRC
66

7-
87
DATA = {
98
"data_0": {"subset": "subset_1"},
109
"data_1": {"subset": "subset_2"},

docs_src/how_to_guides/bp_scaling_tasks_3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from my_project.config import BLD
55
from my_project.data_preparation.config import DATA
66

7-
87
_MODELS = ["linear_probability", "logistic_model", "decision_tree"]
98

109

docs_src/how_to_guides/bp_structure_of_task_files.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ def task_prepare_census_data(
2626
df.to_pickle(path_to_census)
2727

2828

29-
def _clean_data(df: pd.DataFrame) -> None:
30-
...
29+
def _clean_data(df: pd.DataFrame) -> None: ...
3130

3231

33-
def _create_new_variables(df: pd.DataFrame) -> None:
34-
...
32+
def _create_new_variables(df: pd.DataFrame) -> None: ...

docs_src/how_to_guides/interfaces/dependencies_annotation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
from pytask import PathNode
55

66

7-
def task_example(path: Annotated[Path, PathNode(path=Path("input.txt"))]) -> None:
8-
...
7+
def task_example(path: Annotated[Path, PathNode(path=Path("input.txt"))]) -> None: ...
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from pathlib import Path
22

33

4-
def task_example(path: Path = Path("input.txt")) -> None:
5-
...
4+
def task_example(path: Path = Path("input.txt")) -> None: ...

0 commit comments

Comments
 (0)