File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1010from typing import Collection
1111from typing import Iterable
1212from typing import Iterator
13- from typing import Protocol
1413from typing import Sequence
1514from typing import TypeVar
1615from typing import overload
2322from narwhals .utils import is_compliant_dataframe
2423from narwhals .utils import is_tracks_depth
2524
25+ if not TYPE_CHECKING :
26+ import sys
27+
28+ if sys .version_info >= (3 , 9 ):
29+ from typing import Protocol
30+ else :
31+ from typing import Generic
32+
33+ Protocol = Generic
34+ else :
35+ from typing import Protocol
36+
2637if TYPE_CHECKING :
2738 from datetime import timezone
2839
Original file line number Diff line number Diff line change 55from typing import Callable
66from typing import Generic
77from typing import Literal
8- from typing import Protocol
98from typing import Sequence
109from typing import TypeVar
1110from typing import Union
1211
12+ if not TYPE_CHECKING :
13+ import sys
14+
15+ if sys .version_info >= (3 , 9 ):
16+ from typing import Protocol
17+ else :
18+ from typing import Generic
19+
20+ Protocol = Generic
21+ else :
22+ from typing import Protocol
23+
1324if TYPE_CHECKING :
1425 from types import ModuleType
1526 from typing import Mapping
You can’t perform that action at this time.
0 commit comments