File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
@tests/stubtest_allowlists Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,6 @@ asyncio.tasks.eager_task_factory
2727builtins.bytearray.resize
2828builtins.classmethod.__annotate__
2929builtins.classmethod.__class_getitem__
30- builtins.complex.from_number
31- builtins.float.from_number
3230builtins.int.__round__
3331builtins.memoryview.__class_getitem__
3432builtins.staticmethod.__annotate__
@@ -56,7 +54,6 @@ enum.EnumType.__signature__
5654faulthandler.dump_c_stack
5755fractions.Fraction.__pow__
5856fractions.Fraction.__rpow__
59- fractions.Fraction.from_number
6057gzip.GzipFile.readinto
6158gzip.GzipFile.readinto1
6259gzip.compress
Original file line number Diff line number Diff line change @@ -400,6 +400,9 @@ class float:
400400 def __abs__ (self ) -> float : ...
401401 def __hash__ (self ) -> int : ...
402402 def __bool__ (self ) -> bool : ...
403+ if sys .version_info >= (3 , 14 ):
404+ @classmethod
405+ def from_number (cls , number : float | SupportsIndex | SupportsFloat , / ) -> Self : ...
403406
404407class complex :
405408 # Python doesn't currently accept SupportsComplex for the second argument
@@ -435,6 +438,9 @@ class complex:
435438 def __bool__ (self ) -> bool : ...
436439 if sys .version_info >= (3 , 11 ):
437440 def __complex__ (self ) -> complex : ...
441+ if sys .version_info >= (3 , 14 ):
442+ @classmethod
443+ def from_number (cls , number : complex | SupportsComplex | SupportsFloat | SupportsIndex , / ) -> Self : ...
438444
439445class _FormatMapMapping (Protocol ):
440446 def __getitem__ (self , key : str , / ) -> Any : ...
Original file line number Diff line number Diff line change @@ -145,3 +145,6 @@ class Fraction(Rational):
145145 @property
146146 def imag (self ) -> Literal [0 ]: ...
147147 def conjugate (self ) -> Fraction : ...
148+ if sys .version_info >= (3 , 14 ):
149+ @classmethod
150+ def from_number (cls , number : float | Rational | _ConvertibleToIntegerRatio ) -> Self : ...
You can’t perform that action at this time.
0 commit comments