File tree 6 files changed +40
-29
lines changed
6 files changed +40
-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 (
75
71
)
76
72
77
73
if TYPE_CHECKING :
74
+ from pandas ._typing import (
75
+ Axis ,
76
+ AxisInt ,
77
+ Level ,
78
+ )
78
79
from pandas import (
79
80
DataFrame ,
80
81
Series ,
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
+ Any ,
12
+ TYPE_CHECKING
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
+ Callable ,
10
+ TYPE_CHECKING
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
+ Any ,
8
+ TYPE_CHECKING
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 ,
44
35
from pandas .core .construction import extract_array
45
36
46
37
if TYPE_CHECKING :
38
+ from pandas ._typing import (
39
+ AxisInt ,
40
+ IndexKeyFunc ,
41
+ Level ,
42
+ NaPosition ,
43
+ Shape ,
44
+ SortKind ,
45
+ npt ,
46
+ )
47
+
47
48
from pandas import MultiIndex
48
49
from pandas .core .arrays import ExtensionArray
49
50
from pandas .core .indexes .base import Index
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