Skip to content

Commit c38b6a3

Browse files
authored
fix(pyright): microsoft/pyright#10924 ignore (#1370)
* fix: error comes from pyright * chore: spelling
1 parent 5099a1a commit c38b6a3

38 files changed

+110
-81
lines changed

pandas-stubs/core/generic.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,6 @@ class NDFrame(indexing.IndexingMixin):
430430
origin: TimeGrouperOrigin | TimestampConvertibleTypes = "start_day",
431431
offset: TimedeltaConvertibleTypes | None = None,
432432
group_keys: _bool = False,
433-
) -> DatetimeIndexResampler[Self]: ...
433+
) -> DatetimeIndexResampler[Self]: ... # pyrefly: ignore[bad-specialization]
434434
@final
435435
def take(self, indices: TakeIndexer, axis: Axis = 0, **kwargs: Any) -> Self: ...

pandas-stubs/core/groupby/generic.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ class DFCallable3(Protocol[P]): # ty: ignore[invalid-argument-type]
229229
class DataFrameGroupBy(GroupBy[DataFrame], Generic[ByT, _TT]):
230230
# error: Overload 3 for "apply" will never be used because its parameters overlap overload 1
231231
@overload # type: ignore[override]
232-
def apply(
232+
def apply( # pyrefly: ignore[bad-override]
233233
self,
234234
func: DFCallable1[P],
235235
/,

pandas-stubs/core/groupby/groupby.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ class GroupBy(BaseGroupBy[NDFrameT]):
255255
def bfill(self, limit: int | None = ...) -> NDFrameT: ...
256256
@final
257257
@property
258-
def nth(self) -> GroupByNthSelector[Self]: ...
258+
def nth(
259+
self,
260+
) -> GroupByNthSelector[Self]: ... # pyrefly: ignore[bad-specialization]
259261
@final
260262
def quantile(
261263
self,

pandas-stubs/core/indexes/base.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class Index(IndexOpsMixin[S1]):
279279
@property
280280
def str(
281281
self,
282-
) -> StringMethods[
282+
) -> StringMethods[ # pyrefly: ignore[bad-specialization]
283283
Self,
284284
MultiIndex,
285285
np_1darray[np.bool],

pandas-stubs/core/series.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
11981198
@property
11991199
def str(
12001200
self,
1201-
) -> StringMethods[
1201+
) -> StringMethods[ # pyrefly: ignore[bad-specialization]
12021202
Self,
12031203
DataFrame,
12041204
Series[bool],

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ pandas = "2.3.2"
4141
pyarrow = ">=10.0.1"
4242
pytest = ">=7.1.2"
4343
pyright = ">=1.1.405"
44-
ty = "^0.0.1a9"
45-
pyrefly = "^0.21.0"
44+
ty = ">=0.0.1a20"
45+
pyrefly = ">=0.32.0"
4646
poethepoet = ">=0.16.5"
4747
loguru = ">=0.6.0"
4848
typing-extensions = ">=4.4.0"
4949
matplotlib = ">=3.10.1"
5050
pre-commit = ">=2.19.0"
51-
black = ">=23.3.0"
52-
isort = ">=5.12.0"
51+
black = ">=25.1.0"
52+
isort = ">=6.0.1"
5353
openpyxl = ">=3.0.10"
5454
tables = { version = ">=3.10.1", python = "<4" }
5555
lxml = ">=4.9.1"

tests/indexes/arithmetic/bool/test_add.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_add_numpy_array() -> None:
5454

5555
# `numpy` typing gives the corresponding `ndarray`s in the static type
5656
# checking, where our `__radd__` cannot override. At runtime, they return
57-
# `Index`s with the correct element type.
57+
# `Index`es with the correct element type.
5858
check(assert_type(b + left, "npt.NDArray[np.bool_]"), pd.Index, np.bool_)
5959
check(assert_type(i + left, "npt.NDArray[np.int64]"), pd.Index, np.integer)
6060
check(assert_type(f + left, "npt.NDArray[np.float64]"), pd.Index, np.floating)

tests/indexes/arithmetic/bool/test_sub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_sub_numpy_array() -> None:
6363

6464
# `numpy` typing gives the corresponding `ndarray`s in the static type
6565
# checking, where our `__rsub__` cannot override. At runtime, they return
66-
# `Index`s with the correct element type.
66+
# `Index`es with the correct element type.
6767
if TYPE_CHECKING_INVALID_USAGE:
6868
assert_type(b - left, Never)
6969
check(assert_type(i - left, "npt.NDArray[np.int64]"), pd.Index, np.integer)

tests/indexes/arithmetic/complex/test_add.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_add_numpy_array() -> None:
5353

5454
# `numpy` typing gives the corresponding `ndarray`s in the static type
5555
# checking, where our `__radd__` cannot override. At runtime, they return
56-
# `Index`s with the correct element type.
56+
# `Index`es with the correct element type.
5757
check(assert_type(b + left, "npt.NDArray[np.bool_]"), pd.Index, np.complexfloating)
5858
check(assert_type(i + left, "npt.NDArray[np.int64]"), pd.Index, np.complexfloating)
5959
check(

tests/indexes/arithmetic/complex/test_sub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_sub_numpy_array() -> None:
5555

5656
# `numpy` typing gives the corresponding `ndarray`s in the static type
5757
# checking, where our `__rsub__` cannot override. At runtime, they return
58-
# `Index`s with the correct element type.
58+
# `Index`es with the correct element type.
5959
check(assert_type(b - left, NoReturn), pd.Index, np.complexfloating)
6060
check(assert_type(i - left, "npt.NDArray[np.int64]"), pd.Index, np.complexfloating)
6161
check(

0 commit comments

Comments
 (0)