Skip to content

Commit c7417e8

Browse files
bluetechJelleZijlstra
authored andcommitted
1 parent c0625d3 commit c7417e8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

stdlib/2/__builtin__.pyi

+1-3
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ class float:
244244
def __trunc__(self) -> int: ...
245245
if sys.version_info >= (3,):
246246
@overload
247-
def __round__(self) -> int: ...
248-
@overload
249-
def __round__(self, ndigits: None) -> int: ...
247+
def __round__(self, ndigits: None = ...) -> int: ...
250248
@overload
251249
def __round__(self, ndigits: int) -> float: ...
252250

stdlib/2and3/builtins.pyi

+1-3
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ class float:
244244
def __trunc__(self) -> int: ...
245245
if sys.version_info >= (3,):
246246
@overload
247-
def __round__(self) -> int: ...
248-
@overload
249-
def __round__(self, ndigits: None) -> int: ...
247+
def __round__(self, ndigits: None = ...) -> int: ...
250248
@overload
251249
def __round__(self, ndigits: int) -> float: ...
252250

stdlib/2and3/numbers.pyi

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Note: these stubs are incomplete. The more complex type
66
# signatures are currently omitted.
77

8-
from typing import Any, Optional, SupportsFloat
8+
from typing import Any, Optional, SupportsFloat, overload
99
from abc import ABCMeta, abstractmethod
1010
import sys
1111

@@ -70,7 +70,11 @@ class Real(Complex, SupportsFloat):
7070
@abstractmethod
7171
def __ceil__(self) -> int: ...
7272
@abstractmethod
73-
def __round__(self, ndigits: Optional[int] = ...): ...
73+
@overload
74+
def __round__(self, ndigits: None = ...): ...
75+
@abstractmethod
76+
@overload
77+
def __round__(self, ndigits: int): ...
7478
def __divmod__(self, other): ...
7579
def __rdivmod__(self, other): ...
7680
@abstractmethod

0 commit comments

Comments
 (0)