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 @@ -481,7 +481,7 @@ def convert(
481
481
values = values [0 ]
482
482
483
483
res_values = lib .maybe_convert_objects (
484
- values ,
484
+ values , # type: ignore[arg-type]
485
485
convert_non_numeric = True ,
486
486
)
487
487
refs = None
@@ -2137,14 +2137,14 @@ def values_for_json(self) -> np.ndarray:
2137
2137
return self .values
2138
2138
2139
2139
@cache_readonly
2140
- def is_numeric (self ) -> bool :
2140
+ def is_numeric (self ) -> bool : # type: ignore[override]
2141
2141
dtype = self .values .dtype
2142
2142
kind = dtype .kind
2143
2143
2144
2144
return kind in "fciub"
2145
2145
2146
2146
@cache_readonly
2147
- def is_object (self ) -> bool :
2147
+ def is_object (self ) -> bool : # type: ignore[override]
2148
2148
return self .values .dtype .kind == "O"
2149
2149
2150
2150
You can’t perform that action at this time.
0 commit comments