Skip to content

Commit 65e8bad

Browse files
GH1221 Fix typing module exposure in pandas.api (pandas-dev#1223)
1 parent 93a9e11 commit 65e8bad

File tree

9 files changed

+17
-20
lines changed

9 files changed

+17
-20
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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,
@@ -11,6 +10,7 @@ from pandas.core.arrays.datetimelike import (
1110
from pandas._typing import (
1211
TimeAmbiguous,
1312
TimeNonexistent,
13+
TimeZones,
1414
)
1515

1616
from pandas.core.dtypes.dtypes import DatetimeTZDtype as DatetimeTZDtype

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 (
@@ -97,6 +93,7 @@ from pandas._typing import (
9793
Dtype,
9894
FilePath,
9995
FillnaOptions,
96+
FloatFormatType,
10097
FormattersType,
10198
GroupByObjectNonScalar,
10299
HashableT,
@@ -147,6 +144,7 @@ from pandas._typing import (
147144
TimeAmbiguous,
148145
TimeNonexistent,
149146
TimeUnit,
147+
TimeZones,
150148
ToStataByteorder,
151149
ToTimestampHow,
152150
UpdateJoin,

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 (
@@ -40,6 +39,7 @@ from pandas._typing import (
4039
TimeNonexistent,
4140
TimestampConvention,
4241
TimeUnit,
42+
TimeZones,
4343
np_ndarray_bool,
4444
)
4545

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-
AxesData,
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+
AxesData,
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
@@ -9,7 +9,6 @@ from typing import (
99
overload,
1010
)
1111

12-
from _typing import SequenceNotStr
1312
import numpy as np
1413
import pandas as pd
1514
from pandas.core.indexes.base import Index
@@ -23,6 +22,7 @@ from pandas._typing import (
2322
DtypeArg,
2423
HashableT,
2524
MaskType,
25+
SequenceNotStr,
2626
np_ndarray_anyint,
2727
np_ndarray_bool,
2828
)

pandas-stubs/core/series.pyi

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

27-
from _typing import (
28-
FloatFormatType,
29-
Label,
30-
ReplaceValue,
31-
Suffixes,
32-
TimeZones,
33-
)
3427
from matplotlib.axes import (
3528
Axes as PlotAxes,
3629
SubplotBase,
@@ -130,6 +123,7 @@ from pandas._typing import (
130123
FilePath,
131124
FillnaOptions,
132125
FloatDtypeArg,
126+
FloatFormatType,
133127
GroupByObjectNonScalar,
134128
HashableT1,
135129
IgnoreRaise,
@@ -143,6 +137,7 @@ from pandas._typing import (
143137
JoinHow,
144138
JSONSerializable,
145139
JsonSeriesOrient,
140+
Label,
146141
Level,
147142
ListLike,
148143
ListLikeU,
@@ -154,18 +149,21 @@ from pandas._typing import (
154149
RandomState,
155150
ReindexMethod,
156151
Renamer,
152+
ReplaceValue,
157153
Scalar,
158154
ScalarT,
159155
SequenceNotStr,
160156
SeriesByT,
161157
SortKind,
162158
StrDtypeArg,
163159
StrLike,
160+
Suffixes,
164161
T,
165162
TimeAmbiguous,
166163
TimedeltaDtypeArg,
167164
TimestampDtypeArg,
168165
TimeUnit,
166+
TimeZones,
169167
ToTimestampHow,
170168
UIntDtypeArg,
171169
ValueKeyFunc,

0 commit comments

Comments
 (0)