Skip to content

Commit 06e747b

Browse files
committed
ENH: set __module__ on IndexSlice
1 parent b2a6d74 commit 06e747b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pandas/core/indexing.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
LossySetitemError,
2929
)
3030
from pandas.errors.cow import _chained_assignment_msg
31-
from pandas.util._decorators import doc
31+
from pandas.util._decorators import (
32+
doc,
33+
set_module,
34+
)
3235

3336
from pandas.core.dtypes.cast import (
3437
can_hold_element,
@@ -101,6 +104,7 @@
101104

102105

103106
# the public IndexSlicerMaker
107+
@set_module("pandas")
104108
class _IndexSlice:
105109
"""
106110
Create an object to more easily perform multi-index slicing.

pandas/tests/api/test_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,5 +457,6 @@ def test_set_module():
457457
assert pd.to_timedelta.__module__ == "pandas"
458458
assert pd.to_numeric.__module__ == "pandas"
459459
assert pd.NamedAgg.__module__ == "pandas"
460+
assert pd.IndexSlice.__module__ == "pandas"
460461
assert api.typing.SeriesGroupBy.__module__ == "pandas.api.typing"
461462
assert api.typing.DataFrameGroupBy.__module__ == "pandas.api.typing"

0 commit comments

Comments
 (0)