Skip to content

Commit 2be746d

Browse files
committed
refactor: Only use Protocol38 in sub CompliantExpr
Still need to untangle `CompliantExpr` + friends #2294 (comment)
1 parent 04b9395 commit 2be746d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

narwhals/_compliant/selectors.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from typing import Collection
1111
from typing import Iterable
1212
from typing import Iterator
13+
from typing import Protocol
1314
from typing import Sequence
1415
from typing import TypeVar
1516
from typing import overload
@@ -27,13 +28,12 @@
2728
import sys
2829

2930
if sys.version_info >= (3, 9):
30-
from typing import Protocol
31+
from typing import Protocol as Protocol38
3132
else:
32-
from typing import Generic
33+
from typing import Generic as Protocol38
3334

34-
Protocol = Generic
3535
else: # pragma: no cover
36-
from typing import Protocol
36+
from typing import Protocol as Protocol38
3737

3838
if TYPE_CHECKING:
3939
from datetime import timezone
@@ -219,7 +219,7 @@ def _iter_columns_dtypes(self, df: LazyFrameT, /) -> Iterator[tuple[ExprT, DType
219219

220220

221221
class CompliantSelector(
222-
CompliantExpr[FrameT, SeriesOrExprT], Protocol[FrameT, SeriesOrExprT]
222+
CompliantExpr[FrameT, SeriesOrExprT], Protocol38[FrameT, SeriesOrExprT]
223223
):
224224
_call: EvalSeries[FrameT, SeriesOrExprT]
225225
_function_name: str

0 commit comments

Comments
 (0)