Make `__round__ positional-only for float, int, Decimal and SupportsRound` (#6242)

This commit is contained in:
Alex Waygood
2021-11-07 23:05:18 +00:00
committed by GitHub
parent c846c35d50
commit d5d0ba158e
4 changed files with 6 additions and 5 deletions

View File

@@ -167,7 +167,7 @@ class SupportsRound(Protocol[_T_co]):
def __round__(self) -> int: ...
@overload
@abstractmethod
def __round__(self, ndigits: int) -> _T_co: ...
def __round__(self, __ndigits: int) -> _T_co: ...
@runtime_checkable
class Sized(Protocol, metaclass=ABCMeta):