Skip to content

Commit 4279c42

Browse files
committed
1 parent 7d16b3b commit 4279c42

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

pandas-stubs/_typing.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,8 @@ Incomplete: TypeAlias = Any
12251225
# differentiating between bool and int/float/complex
12261226
# https://github.com/pandas-dev/pandas-stubs/pull/1312#pullrequestreview-3126128971
12271227
class Just(Protocol, Generic[T]):
1228-
@property # type: ignore[override]
1228+
# TODO: python/mypy#15900 we did use explicit override but mypy does not see it
1229+
@property # type: ignore[override,explicit-override]
12291230
@override
12301231
def __class__(self, /) -> type[T]: ... # pyrefly: ignore[bad-override]
12311232
@__class__.setter
@@ -1236,7 +1237,8 @@ class Just(Protocol, Generic[T]):
12361237
# TODO: caveats astral-sh/ty#4150 python/mypy#21795
12371238
class CovariantList(Protocol[_T_co]):
12381239
__hash__: ClassVar[None] # type: ignore[assignment] # pyright: ignore[reportIncompatibleMethodOverride]
1239-
@property # type: ignore[override]
1240+
# TODO: python/mypy#15900 we did use explicit override but mypy does not see it
1241+
@property # type: ignore[override,explicit-override]
12401242
@override
12411243
def __class__(self) -> type[list[Any]]: ... # pyrefly: ignore[bad-override]
12421244
@__class__.setter

pandas-stubs/core/arrays/timedeltas.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ class TimedeltaArray(TimelikeOps):
133133
def nanoseconds(self) -> np_1darray_int32: ...
134134
@property
135135
def components(self) -> DataFrame: ...
136-
@property
136+
# TODO: python/mypy#15900 we did use explicit override but mypy does not see it
137+
@property # type: ignore[explicit-override]
137138
@override
138139
def freq(self) -> DateOffset | None: ... # pyrefly: ignore[bad-override]
139140
@freq.setter # type: ignore[override]

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,11 @@ warn_return_any = false # TODO
291291
warn_unreachable = true
292292
# Suppressing errors
293293
ignore_errors = false
294-
enable_error_code = "ignore-without-code" # same as in pandas
294+
enable_error_code = [
295+
"ignore-without-code", # same as in pandas
296+
# TODO: exhaust https://mypy.readthedocs.io/en/stable/error_code_list2.html
297+
"explicit-override"
298+
]
295299
# Miscellaneous strictness flags
296300
allow_untyped_globals = false
297301
allow_redefinition = false

0 commit comments

Comments
 (0)