Skip to content

Commit 2a69cfc

Browse files
GH1221 Fix typing module exposure in pandas.api
1 parent cbb6723 commit 2a69cfc

File tree

9 files changed

+17
-19
lines changed

9 files changed

+17
-19
lines changed

pandas-stubs/api/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ from pandas.api import (
33
indexers as indexers,
44
interchange as interchange,
55
types as types,
6+
typing as typing,
67
)

pandas-stubs/api/typing/__init__.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from pandas.core.groupby import (
22
DataFrameGroupBy as DataFrameGroupBy,
33
SeriesGroupBy as SeriesGroupBy,
44
)
5+
from pandas.core.indexes.frozen import FrozenList as FrozenList
56
from pandas.core.resample import (
67
DatetimeIndexResamplerGroupby as DatetimeIndexResamplerGroupby,
78
PeriodIndexResamplerGroupby as PeriodIndexResamplerGroupby,
@@ -20,6 +21,7 @@ from pandas.core.window import (
2021
)
2122

2223
from pandas._libs import NaTType as NaTType
24+
from pandas._libs.lib import NoDefault as NoDefault
2325
from pandas._libs.missing import NAType as NAType
2426

2527
from pandas.io.json._json import JsonReader as JsonReader

pandas-stubs/core/arrays/datetimes.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
from datetime import tzinfo
22

3-
from _typing import TimeZones
43
import numpy as np
54
from pandas.core.arrays.datetimelike import (
65
DatelikeOps,
76
DatetimeLikeArrayMixin,
87
TimelikeOps,
98
)
109

10+
from pandas._typing import TimeZones
11+
1112
from pandas.core.dtypes.dtypes import DatetimeTZDtype as DatetimeTZDtype
1213

1314
def tz_to_dtype(tz): ...

pandas-stubs/core/dtypes/dtypes.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ from typing import (
55
TypeVar,
66
)
77

8-
from _typing import TimeZones
98
import numpy as np
109
from pandas.core.indexes.base import Index
1110
from pandas.core.series import Series
@@ -18,6 +17,7 @@ from pandas._libs.tslibs.offsets import (
1817
)
1918
from pandas._typing import (
2019
Ordered,
20+
TimeZones,
2121
npt,
2222
)
2323

pandas-stubs/core/frame.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ from typing import (
1818
overload,
1919
)
2020

21-
from _typing import (
22-
FloatFormatType,
23-
TimeZones,
24-
)
2521
from matplotlib.axes import Axes as PlotAxes
2622
import numpy as np
2723
from pandas import (
@@ -90,6 +86,7 @@ from pandas._typing import (
9086
Dtype,
9187
FilePath,
9288
FillnaOptions,
89+
FloatFormatType,
9390
FormattersType,
9491
GroupByObjectNonScalar,
9592
HashableT,
@@ -134,6 +131,7 @@ from pandas._typing import (
134131
T as _T,
135132
TimestampConvention,
136133
TimeUnit,
134+
TimeZones,
137135
ValidationOptions,
138136
WriteBuffer,
139137
XMLParsers,

pandas-stubs/core/indexes/accessors.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ from typing import (
99
TypeVar,
1010
)
1111

12-
from _typing import TimeZones
1312
import numpy as np
1413
import numpy.typing as npt
1514
from pandas import (
@@ -38,6 +37,7 @@ from pandas._libs.tslibs.offsets import DateOffset
3837
from pandas._typing import (
3938
TimestampConvention,
4039
TimeUnit,
40+
TimeZones,
4141
np_ndarray_bool,
4242
)
4343

pandas-stubs/core/indexes/datetimes.pyi

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ from datetime import (
99
)
1010
from typing import overload
1111

12-
from _typing import (
13-
Axes,
14-
Frequency,
15-
TimeZones,
16-
)
1712
import numpy as np
1813
from pandas import (
1914
DataFrame,
@@ -31,10 +26,13 @@ from pandas.core.series import (
3126
from typing_extensions import Self
3227

3328
from pandas._typing import (
29+
Axes,
3430
DateAndDatetimeLike,
3531
Dtype,
32+
Frequency,
3633
IntervalClosedType,
3734
TimeUnit,
35+
TimeZones,
3836
)
3937

4038
from pandas.core.dtypes.dtypes import DatetimeTZDtype

pandas-stubs/core/indexes/multi.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ from typing import (
1010
overload,
1111
)
1212

13-
from _typing import SequenceNotStr
1413
import numpy as np
1514
import pandas as pd
1615
from pandas.core.indexes.base import Index
@@ -22,6 +21,7 @@ from pandas._typing import (
2221
DtypeArg,
2322
HashableT,
2423
MaskType,
24+
SequenceNotStr,
2525
np_ndarray_anyint,
2626
np_ndarray_bool,
2727
)

pandas-stubs/core/series.pyi

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ from typing import (
2424
overload,
2525
)
2626

27-
from _typing import (
28-
FloatFormatType,
29-
Label,
30-
ReplaceValue,
31-
TimeZones,
32-
)
3327
from matplotlib.axes import (
3428
Axes as PlotAxes,
3529
SubplotBase,
@@ -127,6 +121,7 @@ from pandas._typing import (
127121
FilePath,
128122
FillnaOptions,
129123
FloatDtypeArg,
124+
FloatFormatType,
130125
GroupByObjectNonScalar,
131126
HashableT1,
132127
IgnoreRaise,
@@ -138,6 +133,7 @@ from pandas._typing import (
138133
IntervalT,
139134
JoinHow,
140135
JsonSeriesOrient,
136+
Label,
141137
Level,
142138
ListLike,
143139
ListLikeU,
@@ -147,6 +143,7 @@ from pandas._typing import (
147143
QuantileInterpolation,
148144
RandomState,
149145
Renamer,
146+
ReplaceValue,
150147
Scalar,
151148
ScalarT,
152149
SequenceNotStr,
@@ -159,6 +156,7 @@ from pandas._typing import (
159156
TimestampConvention,
160157
TimestampDtypeArg,
161158
TimeUnit,
159+
TimeZones,
162160
UIntDtypeArg,
163161
VoidDtypeArg,
164162
WriteBuffer,

0 commit comments

Comments
 (0)