@@ -3404,7 +3404,6 @@ class inexact(number[_NBit1]): # type: ignore
3404
3404
def __getnewargs__ (self : inexact [_64Bit ]) -> tuple [float , ...]: ...
3405
3405
3406
3406
_IntType = TypeVar ("_IntType" , bound = integer [Any ])
3407
- _FloatType = TypeVar ('_FloatType' , bound = floating [Any ])
3408
3407
3409
3408
class floating (inexact [_NBit1 ]):
3410
3409
def __init__ (self , value : _FloatValue = ..., / ) -> None : ...
@@ -3834,27 +3833,30 @@ class busdaycalendar:
3834
3833
@property
3835
3834
def holidays (self ) -> NDArray [datetime64 ]: ...
3836
3835
3837
- class finfo (Generic [_FloatType ]):
3838
- dtype : dtype [_FloatType ]
3839
- bits : int
3840
- eps : _FloatType
3841
- epsneg : _FloatType
3842
- iexp : int
3843
- machep : int
3844
- max : _FloatType
3845
- maxexp : int
3846
- min : _FloatType
3847
- minexp : int
3848
- negep : int
3849
- nexp : int
3850
- nmant : int
3851
- precision : int
3852
- resolution : _FloatType
3853
- smallest_subnormal : _FloatType
3836
+
3837
+ _FloatType_co = TypeVar ('_FloatType_co' , bound = floating [Any ], covariant = True )
3838
+
3839
+ class finfo (Generic [_FloatType_co ]):
3840
+ dtype : Final [dtype [_FloatType_co ]]
3841
+ bits : Final [int ]
3842
+ eps : Final [_FloatType_co ]
3843
+ epsneg : Final [_FloatType_co ]
3844
+ iexp : Final [int ]
3845
+ machep : Final [int ]
3846
+ max : Final [_FloatType_co ]
3847
+ maxexp : Final [int ]
3848
+ min : Final [_FloatType_co ]
3849
+ minexp : Final [int ]
3850
+ negep : Final [int ]
3851
+ nexp : Final [int ]
3852
+ nmant : Final [int ]
3853
+ precision : Final [int ]
3854
+ resolution : Final [_FloatType_co ]
3855
+ smallest_subnormal : Final [_FloatType_co ]
3854
3856
@property
3855
- def smallest_normal (self ) -> _FloatType : ...
3857
+ def smallest_normal (self ) -> _FloatType_co : ...
3856
3858
@property
3857
- def tiny (self ) -> _FloatType : ...
3859
+ def tiny (self ) -> _FloatType_co : ...
3858
3860
@overload
3859
3861
def __new__ (
3860
3862
cls , dtype : inexact [_NBit1 ] | _DTypeLike [inexact [_NBit1 ]]
@@ -3868,18 +3870,22 @@ class finfo(Generic[_FloatType]):
3868
3870
cls , dtype : str
3869
3871
) -> finfo [floating [Any ]]: ...
3870
3872
3871
- class iinfo (Generic [_IntType ]):
3872
- dtype : dtype [_IntType ]
3873
- kind : LiteralString
3874
- bits : int
3875
- key : LiteralString
3873
+ _IntType_co = TypeVar ("_IntType_co" , bound = integer [Any ], covariant = True )
3874
+
3875
+ class iinfo (Generic [_IntType_co ]):
3876
+ dtype : Final [dtype [_IntType_co ]]
3877
+ kind : Final [LiteralString ]
3878
+ bits : Final [int ]
3879
+ key : Final [LiteralString ]
3876
3880
@property
3877
3881
def min (self ) -> int : ...
3878
3882
@property
3879
3883
def max (self ) -> int : ...
3880
3884
3881
3885
@overload
3882
- def __new__ (cls , dtype : _IntType | _DTypeLike [_IntType ]) -> iinfo [_IntType ]: ...
3886
+ def __new__ (
3887
+ cls , dtype : _IntType_co | _DTypeLike [_IntType_co ]
3888
+ ) -> iinfo [_IntType_co ]: ...
3883
3889
@overload
3884
3890
def __new__ (cls , dtype : int | type [int ]) -> iinfo [int_ ]: ...
3885
3891
@overload
0 commit comments