Skip to content

Commit e95948f

Browse files
authored
ENH: set __module__ on period_range (#62645)
1 parent 531c0e3 commit e95948f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

pandas/core/indexes/period.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ def shift(self, periods: int = 1, freq=None) -> Self:
538538
return self + periods
539539

540540

541+
@set_module("pandas")
541542
def period_range(
542543
start=None,
543544
end=None,

pandas/tests/api/test_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ def test_set_module():
524524
assert pd.Series.__module__ == "pandas"
525525
assert pd.date_range.__module__ == "pandas"
526526
assert pd.bdate_range.__module__ == "pandas"
527+
assert pd.period_range.__module__ == "pandas"
527528
assert pd.timedelta_range.__module__ == "pandas"
528529
assert pd.to_datetime.__module__ == "pandas"
529530
assert pd.to_timedelta.__module__ == "pandas"

0 commit comments

Comments
 (0)