mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Python3.8 additions and changes (#3337)
* Add as_integer_ratio() to a few types * Add dirs_exist_ok to copytree() * int, float, complex accept __index__ args Also fix complex.__init__ argument names * Add __reversed__ to dict et al. * Python 3.8 date(time) arithmetic fixes * Add CodeType.replace()
This commit is contained in:
committed by
Jelle Zijlstra
parent
d0beab9b8e
commit
8a7d61741d
@@ -4,7 +4,7 @@
|
||||
# Note: these stubs are incomplete. The more complex type
|
||||
# signatures are currently omitted. Also see numbers.pyi.
|
||||
|
||||
from typing import Optional, TypeVar, Union, overload, Any
|
||||
from typing import Optional, TypeVar, Union, overload, Any, Tuple
|
||||
from numbers import Real, Integral, Rational
|
||||
from decimal import Decimal
|
||||
import sys
|
||||
@@ -42,6 +42,8 @@ class Fraction(Rational):
|
||||
def from_decimal(cls, dec: Decimal) -> Fraction: ...
|
||||
def limit_denominator(self, max_denominator: int = ...) -> Fraction: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def as_integer_ratio(self) -> Tuple[int, int]: ...
|
||||
@property
|
||||
def numerator(self) -> int: ...
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user