Skip to content

Commit 4cad204

Browse files
committed
manual
1 parent ef69b33 commit 4cad204

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+57
-422
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
- flake8-pyi==22.5.1
3131
types: [pyi]
3232
args: [
33-
--ignore=E301 E302 E305 E402 E501 E701 E704 F401 F811 W503 Y019 Y026 Y027 Y034 Y037,
33+
--ignore=E301 E302 E305 E402 E501 E701 E704 F401 F811 W503 Y019 Y022 Y026 Y027 Y034 Y037,
3434
# TypeVars in private files are already private
3535
--per-file-ignores=_*.pyi:Y001
3636
]

pandas-stubs/_libs/interval.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ from typing import (
44
Any,
55
Generic,
66
TypeVar,
7-
Union,
87
overload,
98
)
109

pandas-stubs/_libs/missing.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from typing import Union
4-
53
class NAType:
64
def __new__(cls, *args, **kwargs) -> NAType: ...
75
def __format__(self, format_spec: str) -> str: ...

pandas-stubs/_libs/tslibs/dtypes.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
from enum import Enum
4-
from typing import Dict
54

65
from .offsets import BaseOffset
76

pandas-stubs/_libs/tslibs/timedeltas.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ from datetime import timedelta
44
from typing import (
55
ClassVar,
66
Literal,
7-
Type,
87
TypeVar,
98
overload,
109
)

pandas-stubs/_libs/tslibs/vectorized.pyi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
List,
5-
Optional,
6-
Sequence,
7-
)
3+
from typing import Sequence
84

95
import numpy as np
106

pandas-stubs/_testing/__init__.pyi

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
List,
5-
Literal,
6-
Optional,
7-
Union,
8-
)
3+
from typing import Literal
94

105
from pandas.core.frame import DataFrame
116
from pandas.core.indexes.base import Index

pandas-stubs/_typing.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ from typing import (
2222
Optional,
2323
Protocol,
2424
Sequence,
25-
Tuple,
2625
Type,
2726
TypeVar,
2827
Union,
@@ -207,6 +206,6 @@ XMLParsers = Literal["lxml", "etree"]
207206
# Any plain Python or numpy function
208207
Function = Union[np.ufunc, Callable[..., Any]]
209208
GroupByObjectNonScalar = Union[
210-
Tuple, List[Label], Function, Series, np.ndarray, Mapping[Label, Any], Index
209+
List[Label], Function, Series, np.ndarray, Mapping[Label, Any], Index
211210
]
212211
GroupByObject = Union[Scalar, GroupByObjectNonScalar]

pandas-stubs/compat/pickle_compat.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import pickle as pkl
4-
from typing import Optional
54

65
def load_reduce(self) -> None: ...
76
def load_newobj(self) -> None: ...

pandas-stubs/core/algorithms.pyi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
Any,
5-
Tuple,
6-
Union,
7-
)
3+
from typing import Any
84

95
import numpy as np
106
from pandas.core.indexes.base import Index

pandas-stubs/core/apply.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ from typing import (
55
Any,
66
Dict,
77
Iterator,
8-
Tuple,
9-
Union,
108
)
119

1210
ResType = Dict[int, Any]

pandas-stubs/core/arraylike.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ from __future__ import annotations
33
from typing import (
44
Any,
55
Protocol,
6-
Tuple,
76
)
87

98
from pandas import DataFrame

pandas-stubs/core/arrays/base.pyi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
Sequence,
5-
Tuple,
6-
Union,
7-
)
3+
from typing import Sequence
84

95
import numpy as np
106

pandas-stubs/core/arrays/boolean.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from typing import Type
4-
53
import numpy as np
64

75
from pandas._typing import Scalar
@@ -10,6 +8,8 @@ from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
108

119
from .masked import BaseMaskedArray as BaseMaskedArray
1210

11+
_type_BooleanArray = type[BooleanArray]
12+
1313
class BooleanDtype(ExtensionDtype):
1414
name: str = ...
1515
@property
@@ -19,7 +19,7 @@ class BooleanDtype(ExtensionDtype):
1919
@property
2020
def kind(self) -> str: ...
2121
@classmethod
22-
def construct_array_type(cls) -> type[BooleanArray]: ...
22+
def construct_array_type(cls) -> _type_BooleanArray: ...
2323
def __from_arrow__(self, array): ...
2424

2525
def coerce_to_array(values, mask=..., copy: bool = ...): ...

pandas-stubs/core/arrays/categorical.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ from __future__ import annotations
33
from typing import (
44
Any,
55
Callable,
6-
Dict,
7-
List,
86
Literal,
9-
Optional,
107
Sequence,
11-
Union,
128
overload,
139
)
1410

pandas-stubs/core/arrays/datetimelike.pyi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
Sequence,
5-
Union,
6-
)
3+
from typing import Sequence
74

85
import numpy as np
96
from pandas.core.arrays.base import (

pandas-stubs/core/arrays/datetimes.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from __future__ import annotations
22

33
from datetime import tzinfo
4-
from typing import (
5-
Optional,
6-
Union,
7-
)
84

95
import numpy as np
106
from pandas.core.arrays import datetimelike as dtl

pandas-stubs/core/arrays/integer.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from typing import Type
4-
53
from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
64

75
from .masked import BaseMaskedArray as BaseMaskedArray

pandas-stubs/core/arrays/interval.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from typing import Optional
4-
53
import numpy as np
64
from pandas import Index
75
from pandas.core.arrays.base import ExtensionArray as ExtensionArray

pandas-stubs/core/arrays/numpy_.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from typing import Union
4-
53
import numpy as np
64
from numpy.lib.mixins import NDArrayOperatorsMixin
75
from pandas.core.arrays.base import (

pandas-stubs/core/arrays/period.pyi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
Optional,
5-
Sequence,
6-
Union,
7-
)
3+
from typing import Sequence
84

95
import numpy as np
106
from pandas.core.arrays import datetimelike as dtl

pandas-stubs/core/arrays/sparse/dtype.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from typing import Optional
4-
53
from pandas._typing import (
64
Dtype,
75
Scalar,

pandas-stubs/core/arrays/string_.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
from __future__ import annotations
22

3-
from typing import Type
4-
53
from pandas.core.arrays import PandasArray as PandasArray
64

75
from pandas.core.dtypes.base import ExtensionDtype as ExtensionDtype
86

7+
_type_StringArray = type[StringArray]
8+
99
class StringDtype(ExtensionDtype):
1010
name: str = ...
1111
na_value = ...
1212
@property
1313
def type(self) -> type: ...
1414
@classmethod
15-
def construct_array_type(cls) -> type[StringArray]: ...
15+
def construct_array_type(cls) -> _type_StringArray: ...
1616
def __from_arrow__(self, array): ...
1717

1818
class StringArray(PandasArray):

pandas-stubs/core/base.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ from __future__ import annotations
33
from typing import (
44
Callable,
55
Generic,
6-
List,
76
Literal,
8-
Optional,
9-
Tuple,
10-
Union,
117
)
128

139
import numpy as np

pandas-stubs/core/common.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ from __future__ import annotations
33
from typing import (
44
Collection,
55
Iterable,
6-
Union,
76
)
87

98
from pandas._typing import T

pandas-stubs/core/computation/eval.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from typing import Optional
4-
53
def eval(
64
expr,
75
parser=...,

pandas-stubs/core/computation/expr.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import ast
4-
from typing import Optional
54

65
from pandas.core.computation.ops import Term as Term
76
from pandas.core.computation.scope import Scope as Scope

pandas-stubs/core/computation/parsing.pyi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from __future__ import annotations
22

33
import tokenize
4-
from typing import (
5-
Iterator,
6-
Tuple,
7-
)
4+
from typing import Iterator
85

96
BACKTICK_QUOTED_STRING: int
107

pandas-stubs/core/computation/pytables.pyi

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
Any,
5-
Dict,
6-
Optional,
7-
Tuple,
8-
)
3+
from typing import Any
94

105
from pandas.core.computation import (
116
expr as expr,

pandas-stubs/core/construction.pyi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
Optional,
5-
Sequence,
6-
Union,
7-
)
3+
from typing import Sequence
84

95
import numpy as np
106
from pandas.core.indexes.api import Index

pandas-stubs/core/dtypes/base.pyi

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
List,
5-
Optional,
6-
Type,
7-
)
8-
93
from pandas.core.arrays import ExtensionArray
104

5+
_type_ExtensionArray = type[ExtensionArray]
6+
117
class ExtensionDtype:
128
def __eq__(self, other) -> bool: ...
139
def __hash__(self) -> int: ...
@@ -23,7 +19,7 @@ class ExtensionDtype:
2319
@property
2420
def names(self) -> list[str] | None: ...
2521
@classmethod
26-
def construct_array_type(cls) -> type[ExtensionArray]: ...
22+
def construct_array_type(cls) -> _type_ExtensionArray: ...
2723
@classmethod
2824
def construct_from_string(cls, string: str): ...
2925
@classmethod

pandas-stubs/core/dtypes/common.pyi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
Callable,
5-
Union,
6-
)
3+
from typing import Callable
74

85
import numpy as np
96

pandas-stubs/core/dtypes/dtypes.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ from __future__ import annotations
22

33
from typing import (
44
Any,
5-
Optional,
65
Sequence,
7-
Tuple,
8-
Type,
9-
Union,
106
)
117

128
from pandas.core.indexes.base import Index

pandas-stubs/core/dtypes/missing.pyi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
from __future__ import annotations
22

3-
from typing import (
4-
List,
5-
Union,
6-
overload,
7-
)
3+
from typing import overload
84

95
import numpy as np
106
from pandas import (

0 commit comments

Comments
 (0)