Skip to content

Commit 75c5a81

Browse files
committed
1 parent b192deb commit 75c5a81

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

narwhals/typing.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import Callable
66
from typing import Generic
77
from typing import Literal
8+
from typing import Protocol
89
from typing import Sequence
910
from typing import TypeVar
1011
from typing import Union
@@ -13,13 +14,11 @@
1314
import sys
1415

1516
if sys.version_info >= (3, 9):
16-
from typing import Protocol
17+
from typing import Protocol as Protocol38
1718
else:
18-
from typing import Generic
19-
20-
Protocol = Generic
19+
from typing import Generic as Protocol38
2120
else:
22-
from typing import Protocol
21+
from typing import Protocol as Protocol38
2322

2423
if TYPE_CHECKING:
2524
from types import ModuleType
@@ -108,7 +107,7 @@ def schema(self) -> Mapping[str, DType]: ...
108107
)
109108

110109

111-
class CompliantExpr(Protocol[CompliantFrameT, CompliantSeriesT_co]):
110+
class CompliantExpr(Protocol38[CompliantFrameT, CompliantSeriesT_co]):
112111
_implementation: Implementation
113112
_backend_version: tuple[int, ...]
114113
_version: Version

0 commit comments

Comments
 (0)