mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-10 05:22:23 +08:00
Improve csv module and float() signature (#1418)
* DictReader should not be abstract. Reformat long lines. * Make restval optional for DictWriter.__init__. * The arg to reader() is *Iterable*, not *Iterator*. * Improve signature of float() (use Union instead of overload).
This commit is contained in:
committed by
Matthias Kramm
parent
945527dbc0
commit
86070643ac
@@ -144,14 +144,7 @@ class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
|
||||
def __nonzero__(self) -> bool: ...
|
||||
|
||||
class float(SupportsFloat, SupportsInt, SupportsAbs[float]):
|
||||
@overload
|
||||
def __init__(self) -> None: ...
|
||||
@overload
|
||||
def __init__(self, x: SupportsFloat) -> None: ...
|
||||
@overload
|
||||
def __init__(self, x: unicode) -> None: ...
|
||||
@overload
|
||||
def __init__(self, x: bytearray) -> None: ...
|
||||
def __init__(self, x: Union[SupportsFloat, str, unicode, bytearray] = ...) -> None: ...
|
||||
def as_integer_ratio(self) -> Tuple[int, int]: ...
|
||||
def hex(self) -> str: ...
|
||||
def is_integer(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user