File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ class RangeIndex(NumericIndex):
98
98
_dtype_validation_metadata = (is_signed_integer_dtype , "signed integer" )
99
99
_range : range
100
100
_values : np .ndarray
101
- _should_fallback_to_positional = False
102
101
103
102
@property
104
103
def _engine_type (self ) -> type [libindex .Int64Engine ]:
@@ -195,7 +194,7 @@ def _validate_dtype(cls, dtype: Dtype | None) -> None:
195
194
# error: Return type "Type[Index]" of "_constructor" incompatible with return
196
195
# type "Type[RangeIndex]" in supertype "Index"
197
196
@cache_readonly
198
- def _constructor (self ) -> type [Index ]:
197
+ def _constructor (self ) -> type [Index ]: # type: ignore[override]
199
198
"""return the class to use for construction"""
200
199
return NumericIndex
201
200
@@ -379,6 +378,13 @@ def _get_indexer(
379
378
locs [valid ] = len (self ) - 1 - locs [valid ]
380
379
return ensure_platform_int (locs )
381
380
381
+ @cache_readonly
382
+ def _should_fallback_to_positional (self ) -> bool :
383
+ """
384
+ Should an integer key be treated as positional?
385
+ """
386
+ return False
387
+
382
388
# --------------------------------------------------------------------
383
389
384
390
def tolist (self ) -> list [int ]:
You can’t perform that action at this time.
0 commit comments