File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
from datetime import datetime , timedelta
2
2
import operator
3
3
from textwrap import dedent
4
- from typing import Union
4
+ from typing import TypeVar , Union
5
5
import warnings
6
6
7
7
import numpy as np
@@ -164,6 +164,9 @@ def _new_Index(cls, d):
164
164
return cls .__new__ (cls , ** d )
165
165
166
166
167
+ INDEXTYPE = TypeVar ('INDEXTYPE' , bound = 'Index' )
168
+
169
+
167
170
class Index (IndexOpsMixin , PandasObject ):
168
171
"""
169
172
Immutable ndarray implementing an ordered, sliceable set. The basic object
@@ -3632,7 +3635,7 @@ def values(self):
3632
3635
return self ._data .view (np .ndarray )
3633
3636
3634
3637
@property
3635
- def _values (self ) -> Union [ExtensionArray , Index , np .ndarray ]:
3638
+ def _values (self ) -> Union [ExtensionArray , INDEXTYPE , np .ndarray ]:
3636
3639
# TODO(EA): remove index types as they become extension arrays
3637
3640
"""
3638
3641
The best array representation.
You can’t perform that action at this time.
0 commit comments