File tree 2 files changed +11
-12
lines changed
2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -44,20 +44,19 @@ def __getattr__(name: str):
44
44
from pandas .util ._exceptions import find_stack_level
45
45
46
46
if name in ["NumericBlock" , "ObjectBlock" ]:
47
- if name == "NumericBlock" :
48
- from pandas .core .internals .blocks import NumericBlock
49
-
50
- block_type = NumericBlock
51
- elif name == "ObjectBlock" :
52
- from pandas .core .internals .blocks import ObjectBlock
53
-
54
- block_type = ObjectBlock
55
47
warnings .warn (
56
48
f"{ name } is deprecated and will be removed in a future version. "
57
49
"Use NumpyBlock instead." ,
58
50
DeprecationWarning ,
59
51
stacklevel = find_stack_level (),
60
52
)
61
- return block_type
53
+ if name == "NumericBlock" :
54
+ from pandas .core .internals .blocks import NumericBlock
55
+
56
+ return NumericBlock
57
+ else :
58
+ from pandas .core .internals .blocks import ObjectBlock
59
+
60
+ return ObjectBlock
62
61
63
62
raise AttributeError (f"module 'pandas.core.internals' has no attribute '{ name } '" )
Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ def convert(
485
485
values = values [0 ]
486
486
487
487
res_values = lib .maybe_convert_objects (
488
- values ,
488
+ values , # type: ignore[arg-type]
489
489
convert_datetime = True ,
490
490
convert_timedelta = True ,
491
491
convert_period = True ,
@@ -2142,14 +2142,14 @@ def values_for_json(self) -> np.ndarray:
2142
2142
return self .values
2143
2143
2144
2144
@cache_readonly
2145
- def is_numeric (self ) -> bool :
2145
+ def is_numeric (self ) -> bool : # type: ignore[override]
2146
2146
dtype = self .values .dtype
2147
2147
kind = dtype .kind
2148
2148
2149
2149
return kind in "fciub"
2150
2150
2151
2151
@cache_readonly
2152
- def is_object (self ) -> bool :
2152
+ def is_object (self ) -> bool : # type: ignore[override]
2153
2153
return self .values .dtype .kind == "O"
2154
2154
2155
2155
You can’t perform that action at this time.
0 commit comments