Skip to content

Commit 49f239b

Browse files
committed
move aliases to _typing.py
1 parent 440206d commit 49f239b

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

pandas/_typing.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,12 @@
146146
CompressionOptions = Optional[Union[str, CompressionDict]]
147147

148148

149-
# type of float formatter in DataFrameFormatter
149+
# types in DataFrameFormatter
150+
FormattersType = Union[
151+
List[Callable], Tuple[Callable, ...], Mapping[Union[str, int], Callable]
152+
]
153+
ColspaceType = Mapping[Label, Union[str, int]]
150154
FloatFormatType = Union[str, Callable, "EngFormatter"]
155+
ColspaceArgType = Union[
156+
str, int, Sequence[Union[str, int]], Mapping[Label, Union[str, int]]
157+
]

pandas/io/formats/format.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@
3939
from pandas._libs.tslibs.nattype import NaTType
4040
from pandas._typing import (
4141
ArrayLike,
42+
ColspaceArgType,
43+
ColspaceType,
4244
CompressionOptions,
4345
FilePathOrBuffer,
4446
FloatFormatType,
47+
FormattersType,
4548
IndexLabel,
4649
Label,
4750
StorageOptions,
@@ -81,14 +84,6 @@
8184
from pandas import Categorical, DataFrame, Series
8285

8386

84-
FormattersType = Union[
85-
List[Callable], Tuple[Callable, ...], Mapping[Union[str, int], Callable]
86-
]
87-
ColspaceType = Mapping[Label, Union[str, int]]
88-
ColspaceArgType = Union[
89-
str, int, Sequence[Union[str, int]], Mapping[Label, Union[str, int]]
90-
]
91-
9287
common_docstring = """
9388
Parameters
9489
----------

0 commit comments

Comments
 (0)