Skip to content

Commit dc10ebd

Browse files
committed
✅ fix failing longdouble | clongdouble type-tests
1 parent 467388f commit dc10ebd

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/numpy-stubs/__init__.pyi

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4714,15 +4714,15 @@ class number(
47144714

47154715
#
47164716
@overload
4717-
def __truediv__(self, x: _nt.CoFloating_0d | _nt.CastsScalar[Self] | _JustNumber, /) -> inexact: ...
4717+
def __truediv__(self, x: _nt.CoFloat64_0d | _nt.CastsScalar[Self] | _JustNumber, /) -> inexact: ...
47184718
@overload
47194719
def __truediv__(self, x: _nt.CastsWithScalar[Self, _InexactT], /) -> _InexactT: ...
47204720
@overload
47214721
def __truediv__(self: _nt.CastsWithComplex[_ComplexFloatingT], x: _nt.JustComplex, /) -> _ComplexFloatingT: ...
47224722

47234723
#
47244724
@overload
4725-
def __rtruediv__(self, x: _nt.CoFloating_0d | _nt.CastsScalar[Self] | _JustNumber, /) -> inexact: ...
4725+
def __rtruediv__(self, x: _nt.CoFloat64_0d | _nt.CastsScalar[Self] | _JustNumber, /) -> inexact: ...
47264726
@overload
47274727
def __rtruediv__(self, x: _nt.CastsWithScalar[Self, _InexactT], /) -> _InexactT: ...
47284728
@overload
@@ -5136,9 +5136,6 @@ class floating(_RealMixin, _RoundMixin, inexact[_BitT, float]):
51365136
@override
51375137
@type_check_only
51385138
def __nep50_rule3__(self, other: _JustFloating, /) -> floating: ...
5139-
@override
5140-
@type_check_only
5141-
def __nep50_rule4__(self, other: _JustComplexFloating, /) -> complexfloating: ...
51425139

51435140
#
51445141
@override
@@ -5245,7 +5242,12 @@ double = float64
52455242
class longdouble(_FloatMixin[L[12, 16]], floating[_n._64L]):
52465243
@override
52475244
@type_check_only
5248-
def __nep50__(self, below: _nt.inexact64l, above: _float64_max | _nt.co_integer, /) -> longdouble: ...
5245+
def __nep50__(
5246+
self,
5247+
below: longdouble | clongdouble,
5248+
above: _nt.co_float64,
5249+
/,
5250+
) -> longdouble: ...
52495251
@override
52505252
@type_check_only
52515253
def __nep50_complex__(self, /) -> clongdouble: ...
@@ -5255,6 +5257,9 @@ class longdouble(_FloatMixin[L[12, 16]], floating[_n._64L]):
52555257
@override
52565258
@type_check_only
52575259
def __nep50_rule4__(self, other: complexfloating | _JustComplexFloating, /) -> clongdouble: ...
5260+
@override
5261+
@type_check_only
5262+
def __nep50_rule6__(self, other: _JustInexact | _JustNumber, /) -> longdouble | clongdouble: ...
52585263

52595264
#
52605265
@overload

0 commit comments

Comments
 (0)