From f93642b32a0981ccaa7685a44d086b4459782d18 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Wed, 21 Sep 2016 16:17:28 +0100 Subject: [PATCH] Add __format__ to float, fixes #560 (#561) Fixes #560. --- stdlib/2.7/__builtin__.pyi | 1 + stdlib/3/builtins.pyi | 1 + 2 files changed, 2 insertions(+) diff --git a/stdlib/2.7/__builtin__.pyi b/stdlib/2.7/__builtin__.pyi index e47720477..9e3dd3332 100644 --- a/stdlib/2.7/__builtin__.pyi +++ b/stdlib/2.7/__builtin__.pyi @@ -160,6 +160,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]): def __float__(self) -> float: ... def __abs__(self) -> float: ... def __hash__(self) -> int: ... + def __format__(self, format_spec: AnyStr) -> str: ... class complex(SupportsAbs[float]): @overload diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 774b90808..6f3e1f1cf 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -148,6 +148,7 @@ class float(SupportsFloat, SupportsInt, SupportsAbs[float]): def __float__(self) -> float: ... def __abs__(self) -> float: ... def __hash__(self) -> int: ... + def __format__(self, format_spec: str) -> str: ... class complex(SupportsAbs[float]): @overload