Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
mypy happiness
  • Loading branch information
cmp0xff committed Oct 19, 2025
commit 84006462db0bfafabeaaafb71d355eff7baea7fa
10 changes: 8 additions & 2 deletions pandas-stubs/_libs/tslibs/period.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import datetime
import sys
from typing import (
Literal,
TypeAlias,
Expand Down Expand Up @@ -94,8 +95,13 @@ class Period(PeriodMixin):
def __add__(self, other: Index) -> PeriodIndex: ...
# Ignored due to indecipherable error from mypy:
# Forward operator "__add__" is not callable [misc]
@overload
def __radd__(self, other: _PeriodAddSub) -> Self: ...
if sys.version_info >= (3, 11):
@overload
def __radd__(self, other: _PeriodAddSub) -> Self: ...
else:
@overload
def __radd__(self, other: _PeriodAddSub) -> Self: ... # type: ignore[misc]

@overload
def __radd__(self, other: NaTType) -> NaTType: ...
# Real signature is -> PeriodIndex, but conflicts with Index.__add__
Expand Down