File tree 6 files changed +39
-29
lines changed
6 files changed +39
-29
lines changed Original file line number Diff line number Diff line change 14
14
import numpy as np
15
15
16
16
from pandas ._libs .ops_dispatch import maybe_dispatch_ufunc_to_dunder_op
17
- from pandas ._typing import (
18
- Axis ,
19
- AxisInt ,
20
- Level ,
21
- )
17
+
22
18
from pandas .util ._decorators import Appender
23
19
24
20
from pandas .core .dtypes .common import (
79
75
DataFrame ,
80
76
Series ,
81
77
)
78
+ from pandas ._typing import (
79
+ Axis ,
80
+ AxisInt ,
81
+ Level ,
82
+ )
82
83
83
84
# -----------------------------------------------------------------------------
84
85
# constants
Original file line number Diff line number Diff line change 7
7
import datetime
8
8
from functools import partial
9
9
import operator
10
- from typing import Any
10
+ from typing import (
11
+ TYPE_CHECKING ,
12
+ Any
13
+ )
11
14
12
15
import numpy as np
13
16
19
22
ops as libops ,
20
23
)
21
24
from pandas ._libs .tslibs import BaseOffset
22
- from pandas ._typing import (
23
- ArrayLike ,
24
- Shape ,
25
- )
26
25
27
26
from pandas .core .dtypes .cast import (
28
27
construct_1d_object_array_from_listlike ,
56
55
from pandas .core .ops .dispatch import should_extension_dispatch
57
56
from pandas .core .ops .invalid import invalid_comparison
58
57
58
+ if TYPE_CHECKING :
59
+ from pandas ._typing import (
60
+ ArrayLike ,
61
+ Shape ,
62
+ )
63
+
59
64
60
65
def comp_method_OBJECT_ARRAY (op , x , y ):
61
66
if isinstance (y , list ):
Original file line number Diff line number Diff line change 5
5
6
6
from functools import wraps
7
7
import sys
8
- from typing import Callable
8
+ from typing import (
9
+ TYPE_CHECKING ,
10
+ Callable
11
+ )
9
12
10
13
from pandas ._libs .lib import item_from_zerodim
11
14
from pandas ._libs .missing import is_matching_na
12
- from pandas ._typing import F
13
15
14
16
from pandas .core .dtypes .generic import (
15
17
ABCDataFrame ,
16
18
ABCIndex ,
17
19
ABCSeries ,
18
20
)
19
21
22
+ if TYPE_CHECKING :
23
+ from pandas ._typing import F
24
+
20
25
21
26
def unpack_zerodim_and_defer (name : str ) -> Callable [[F ], F ]:
22
27
"""
Original file line number Diff line number Diff line change 3
3
"""
4
4
from __future__ import annotations
5
5
6
- from typing import Any
7
-
8
- from pandas ._typing import ArrayLike
6
+ from typing import (
7
+ TYPE_CHECKING ,
8
+ Any
9
+ )
9
10
10
11
from pandas .core .dtypes .generic import ABCExtensionArray
11
12
13
+ if TYPE_CHECKING :
14
+ from pandas ._typing import ArrayLike
15
+
12
16
13
17
def should_extension_dispatch (left : ArrayLike , right : Any ) -> bool :
14
18
"""
Original file line number Diff line number Diff line change 20
20
lib ,
21
21
)
22
22
from pandas ._libs .hashtable import unique_label_indices
23
- from pandas ._typing import (
24
- AxisInt ,
25
- IndexKeyFunc ,
26
- Level ,
27
- NaPosition ,
28
- Shape ,
29
- SortKind ,
30
- npt ,
31
- )
32
23
33
24
from pandas .core .dtypes .common import (
34
25
ensure_int64 ,
47
38
from pandas import MultiIndex
48
39
from pandas .core .arrays import ExtensionArray
49
40
from pandas .core .indexes .base import Index
41
+ from pandas ._typing import (
42
+ AxisInt ,
43
+ IndexKeyFunc ,
44
+ Level ,
45
+ NaPosition ,
46
+ Shape ,
47
+ SortKind ,
48
+ npt ,
49
+ )
50
50
51
51
52
52
def get_indexer_indexer (
Original file line number Diff line number Diff line change @@ -300,11 +300,6 @@ exclude = [
300
300
"pandas/core/series.py" = [" TCH" ]
301
301
"pandas/core/resample.py" = [" TCH" ]
302
302
"pandas/core/nanops.py" = [" TCH" ]
303
- "pandas/core/apply.py" = [" TCH" ]
304
- "pandas/core/base.py" = [" TCH" ]
305
- "pandas/core/algorithms.py" = [" TCH" ]
306
- "pandas/core/ops/*" = [" TCH" ]
307
- "pandas/core/sorting.py" = [" TCH" ]
308
303
"pandas/core/construction.py" = [" TCH" ]
309
304
"pandas/core/common.py" = [" TCH" ]
310
305
"pandas/core/missing.py" = [" TCH" ]
You can’t perform that action at this time.
0 commit comments