File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -601,7 +601,9 @@ def _dtype_to_subclass(cls, dtype: DtypeObj):
601
601
# See each method's docstring.
602
602
603
603
@classmethod
604
- def _simple_new (cls : type [_IndexT ], values , name : Hashable = None ) -> _IndexT :
604
+ def _simple_new (
605
+ cls : type [_IndexT ], values : ArrayLike , name : Hashable = None
606
+ ) -> _IndexT :
605
607
"""
606
608
We require that we have a dtype compat for the values. If we are passed
607
609
a non-dtype compat, then coerce using the constructor.
Original file line number Diff line number Diff line change @@ -167,8 +167,13 @@ def from_range(
167
167
cls ._validate_dtype (dtype )
168
168
return cls ._simple_new (data , name = name )
169
169
170
+ # error: Argument 1 of "_simple_new" is incompatible with supertype "Index";
171
+ # supertype defines the argument type as
172
+ # "Union[ExtensionArray, ndarray[Any, Any]]" [override]
170
173
@classmethod
171
- def _simple_new (cls , values : range , name : Hashable = None ) -> RangeIndex :
174
+ def _simple_new ( # type: ignore[override]
175
+ cls , values : range , name : Hashable = None
176
+ ) -> RangeIndex :
172
177
result = object .__new__ (cls )
173
178
174
179
assert isinstance (values , range )
You can’t perform that action at this time.
0 commit comments