Skip to content

Commit ee5b2cf

Browse files
➕ Add typing-extensions to test requirements for Python < 3.9 (#12)
Co-authored-by: Sofie Van Landeghem <[email protected]> Co-authored-by: svlandeg <[email protected]>
1 parent 17c5fb8 commit ee5b2cf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

requirements-tests.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
-e .
22

33
pytest >=8.3.5
4+
typing-extensions; python_version < "3.9"
45
coverage[toml] >=7.6.1
56
mypy ==1.14.1
67
ruff ==0.14.3

tests/test_main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import pickle
2-
3-
from typing_extensions import Annotated, get_type_hints
2+
import sys
43

54
from annotated_doc import Doc
65

6+
if sys.version_info >= (3, 9):
7+
from typing import Annotated, get_type_hints
8+
else:
9+
from typing_extensions import Annotated, get_type_hints
10+
711

812
def test_doc_basic() -> None:
913
doc = Doc("This is a test documentation.")

0 commit comments

Comments
 (0)