Skip to content

Commit af9b633

Browse files
authored
support pyright 1.1.390 (#1068)
1 parent 4e21a31 commit af9b633

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pandas-stubs/core/groupby/generic.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class DataFrameGroupBy(GroupBy[DataFrame], Generic[ByT, _TT]):
211211
) -> DataFrame: ...
212212
# error: overload 1 overlaps overload 2 because of different return types
213213
@overload
214-
def aggregate(self, func: Literal["size"]) -> Series: ... # type: ignore[overload-overlap] # pyright: ignore[reportOverlappingOverload]
214+
def aggregate(self, func: Literal["size"]) -> Series: ... # type: ignore[overload-overlap]
215215
@overload
216216
def aggregate(
217217
self,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ mypy = "1.13.0"
3737
pandas = "2.2.3"
3838
pyarrow = ">=10.0.1"
3939
pytest = ">=7.1.2"
40-
pyright = ">= 1.1.387"
40+
pyright = ">= 1.1.390"
4141
poethepoet = ">=0.16.5"
4242
loguru = ">=0.6.0"
4343
typing-extensions = ">=4.4.0"

tests/test_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2404,7 +2404,7 @@ def test_indexslice_getitem():
24042404
# Once pyright 1.1.390 and mypy 1.14 are released, the test can be
24052405
# reverted to the standard form.
24062406
# check(assert_type(pd.IndexSlice[ind, :], tuple["pd.Index[int]", slice]), tuple)
2407-
tmp: tuple[pd.Index[int], slice] = pd.IndexSlice[ind, :]
2407+
tmp = cast(tuple["pd.Index[int]", slice], pd.IndexSlice[ind, :]) # type: ignore[redundant-cast]
24082408
check(assert_type(tmp, tuple["pd.Index[int]", slice]), tuple)
24092409
check(assert_type(df.loc[pd.IndexSlice[ind, :]], pd.DataFrame), pd.DataFrame)
24102410
check(assert_type(df.loc[pd.IndexSlice[1:2]], pd.DataFrame), pd.DataFrame)

0 commit comments

Comments
 (0)