@@ -13,22 +13,20 @@ from pandas._typing import (
13
13
14
14
from .base import ExtensionDtype as ExtensionDtype
15
15
16
- _str = str
17
-
18
16
def register_extension_dtype (cls : type [ExtensionDtype ]) -> type [ExtensionDtype ]: ...
19
17
20
18
class BaseMaskedDtype (ExtensionDtype ): ...
21
19
22
20
class PandasExtensionDtype (ExtensionDtype ):
23
21
subdtype = ...
24
- str : _str | None = ...
22
+ str : str | None = ...
25
23
num : int = ...
26
24
shape : tuple [int , ...] = ...
27
25
itemsize : int = ...
28
26
base = ...
29
27
isbuiltin : int = ...
30
28
isnative : int = ...
31
- def __hash__ ( self ) -> int : ...
29
+
32
30
@classmethod
33
31
def reset_cache (cls ) -> None : ...
34
32
@@ -38,42 +36,34 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype):
38
36
categories : Series | Index | list [Any ] | None = ...,
39
37
ordered : Ordered = ...,
40
38
) -> None : ...
41
- def __hash__ (self ) -> int : ...
42
- def __eq__ (self , other ) -> bool : ...
43
39
@property
44
40
def categories (self ) -> Index : ...
45
41
@property
46
42
def ordered (self ) -> Ordered : ...
47
43
48
44
class DatetimeTZDtype (PandasExtensionDtype ):
49
45
def __init__ (
50
- self , unit : _str = ..., tz : str | int | dt .tzinfo | None = ...
46
+ self , unit : str = ..., tz : str | int | dt .tzinfo | None = ...
51
47
) -> None : ...
52
48
@property
53
49
def unit (self ): ...
54
50
@property
55
51
def tz (self ): ...
56
52
@property
57
- def name (self ) -> _str : ...
58
- def __hash__ (self ) -> int : ...
59
- def __eq__ (self , other ) -> bool : ...
53
+ def name (self ) -> str : ...
60
54
61
55
class PeriodDtype (PandasExtensionDtype ):
62
56
def __new__ (cls , freq : str | BaseOffset = ...): ...
63
- def __hash__ (self ) -> int : ...
64
- def __eq__ (self , other ) -> bool : ...
65
57
@property
66
58
def freq (self ): ...
67
59
@property
68
- def name (self ) -> _str : ...
60
+ def name (self ) -> str : ...
69
61
@property
70
62
def na_value (self ): ...
71
63
def __from_arrow__ (self , array ): ...
72
64
73
65
class IntervalDtype (PandasExtensionDtype ):
74
66
def __new__ (cls , subtype : str | npt .DTypeLike | None = ...): ...
75
- def __hash__ (self ) -> int : ...
76
- def __eq__ (self , other ) -> bool : ...
77
67
@property
78
68
def subtype (self ): ...
79
69
@property
0 commit comments