File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ classifiers = [
2828 " Topic :: Utilities" ,
2929 " Typing :: Typed" ,
3030]
31- dependencies = []
31+ dependencies = [
32+ # TODO: remove once support for Python 3.8 is dropped
33+ " typing-extensions>=4.7; python_version < '3.9'" ,
34+ ]
3235
3336[project .urls ]
3437Homepage = " https://pawamoy.github.io/griffe-typingdoc"
Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55import ast
6+ import sys
67from collections import defaultdict
7- from typing import TYPE_CHECKING , Annotated , Any
8+ from typing import TYPE_CHECKING , Any
89
910from griffe .agents .extensions import VisitorExtension , When
1011from griffe .agents .nodes import safe_get_annotation
1112from griffe .docstrings .dataclasses import DocstringParameter , DocstringSectionParameters
1213
1314from griffe_typingdoc .typing_doc import __typing_doc__
1415
16+ # TODO: remove once support for Python 3.8 is dropped
17+ if sys .version_info < (3 , 9 ):
18+ from typing_extensions import Annotated
19+ else :
20+ from typing import Annotated
21+
1522if TYPE_CHECKING :
1623 from griffe .dataclasses import Function
1724
You can’t perform that action at this time.
0 commit comments