Skip to content

Commit 2227e61

Browse files
committed
Import many stuff from typing instead of typing_extensions.
1 parent 4e3d769 commit 2227e61

File tree

72 files changed

+190
-183
lines changed

Some content is hidden

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

72 files changed

+190
-183
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ with `task_`. Here is an example.
8282
from pathlib import Path
8383

8484
from pytask import Product
85-
from typing_extensions import Annotated
85+
from typing import Annotated
8686

8787

8888
def task_hello_earth(path: Annotated[Path, Product] = Path("hello_earth.txt")):

docs/source/how_to_guides/the_data_catalog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ The task could look like this.
110110
```python
111111
from pathlib import Path
112112
from pytask import task
113-
from typing_extensions import Annotated
113+
from typing import Annotated
114114

115115
from my_project.config import DATA_NAMES
116116
from my_project.config import MODEL_NAMES

docs/source/how_to_guides/writing_custom_nodes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ databases. [^kedro]
142142

143143
## References
144144

145-
[^structural-subtyping]: Structural subtyping is similar to ABCs an approach in Python to enforce interfaces, but
146-
it can be considered more pythonic since it is closer to duck typing. Hynek Schlawack
147-
wrote a comprehensive
145+
[^structural-subtyping]: Structural subtyping is similar to ABCs an approach in Python to enforce interfaces,
146+
but it can be considered more pythonic since it is closer to duck typing. Hynek
147+
Schlawack wrote a comprehensive
148148
[guide on subclassing](https://hynek.me/articles/python-subclassing-redux/) that
149149
features protocols under "Type 2". Glyph wrote an introduction to protocols called
150150
[I want a new duck](https://glyph.twistedmatrix.com/2020/07/new-duck.html).

docs/source/reference_guides/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ resolution and execution.
329329
330330
>>> from pathlib import Path
331331
>>> from pytask import Product
332-
>>> from typing_extensions import Annotated
332+
>>> from typing import Annotated
333333
>>> def task_example(path: Annotated[Path, Product]) -> None:
334334
... path.write_text("Hello, World!")
335335

docs_src/how_to_guides/bp_structure_of_task_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from pathlib import Path
2+
from typing import Annotated
23

34
import pandas as pd
45
from checks import perform_general_checks_on_data
5-
from typing_extensions import Annotated
66

77
from pytask import Product
88

docs_src/how_to_guides/capturing_warnings_1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pathlib import Path
2+
from typing import Annotated
23

34
import pandas as pd
4-
from typing_extensions import Annotated
55

66
from pytask import Product
77

docs_src/how_to_guides/capturing_warnings_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pathlib import Path
2+
from typing import Annotated
23

34
import pandas as pd
4-
from typing_extensions import Annotated
55

66
import pytask
77
from pytask import Product

docs_src/how_to_guides/migrating_from_scripts_to_pytask_4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Content of task_data_management.py
22
from pathlib import Path
3+
from typing import Annotated
34

45
import pandas as pd
5-
from typing_extensions import Annotated
66

77
from pytask import Product
88

docs_src/how_to_guides/migrating_from_scripts_to_pytask_5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from pathlib import Path
2+
from typing import Annotated
23
from typing import Optional
34

45
import pandas as pd
5-
from typing_extensions import Annotated
66

77
from pytask import Product
88

docs_src/how_to_guides/provisional_products.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pathlib import Path
2+
from typing import Annotated
23

34
import httpx
4-
from typing_extensions import Annotated
55

66
from pytask import DirectoryNode
77
from pytask import Product

0 commit comments

Comments
 (0)