We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10bddcd commit c3d5150Copy full SHA for c3d5150
tests/series/test_series.py
@@ -41,7 +41,6 @@
41
import pytest
42
from typing_extensions import (
43
Never,
44
- Self,
45
assert_type,
46
)
47
import xarray as xr
@@ -2221,8 +2220,8 @@ def test_pandera_generic() -> None:
2221
2220
# GH 471
2222
2223
class MySeries(pd.Series, Generic[T]):
2224
- def __new__(cls, *args: Any, **kwargs: Any) -> Self:
2225
- return super().__new__(cls) # type: ignore[return-value] # pyright: ignore[reportReturnType]
+ def __new__(cls, *args: Any, **kwargs: Any) -> MySeries[T]:
+ return cast(MySeries[T], super().__new__(cls))
2226
2227
def func() -> MySeries[float]:
2228
return MySeries[float]([1, 2, 3])
0 commit comments