|
5 | 5 | import re |
6 | 6 | from functools import partial |
7 | 7 | from typing import TYPE_CHECKING |
| 8 | +from typing import Any |
8 | 9 | from typing import Callable |
9 | 10 | from typing import Collection |
10 | 11 | from typing import Generic |
|
41 | 42 |
|
42 | 43 |
|
43 | 44 | SeriesT = TypeVar("SeriesT", bound="CompliantSeries") |
44 | | -FrameT = TypeVar("FrameT", bound="CompliantDataFrame | CompliantLazyFrame") |
| 45 | +FrameT = TypeVar("FrameT", bound="CompliantDataFrame[Any] | CompliantLazyFrame") |
45 | 46 | SelectorOrExpr: TypeAlias = ( |
46 | 47 | "CompliantSelector[FrameT, SeriesT] | CompliantExpr[FrameT, SeriesT]" |
47 | 48 | ) |
@@ -265,14 +266,16 @@ def names(df: FrameT) -> Sequence[str]: |
265 | 266 | return self._to_expr() & other |
266 | 267 |
|
267 | 268 | def __invert__(self: Self) -> CompliantSelector[FrameT, SeriesT]: |
268 | | - return self.selectors.all() - self |
| 269 | + return self.selectors.all() - self # type: ignore[no-any-return] |
269 | 270 |
|
270 | 271 | def __repr__(self: Self) -> str: # pragma: no cover |
271 | 272 | s = f"depth={self._depth}, " if is_tracks_depth(self._implementation) else "" |
272 | 273 | return f"{type(self).__name__}({s}function_name={self._function_name})" |
273 | 274 |
|
274 | 275 |
|
275 | 276 | def _eval_lhs_rhs( |
276 | | - df: CompliantDataFrame | CompliantLazyFrame, lhs: CompliantExpr, rhs: CompliantExpr |
| 277 | + df: CompliantDataFrame[Any] | CompliantLazyFrame, |
| 278 | + lhs: CompliantExpr[Any, Any], |
| 279 | + rhs: CompliantExpr[Any, Any], |
277 | 280 | ) -> tuple[Sequence[str], Sequence[str]]: |
278 | 281 | return lhs._evaluate_output_names(df), rhs._evaluate_output_names(df) |
0 commit comments