From af23c105668a84dfeaf7a7b3a1598a224c5685e4 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Fri, 6 Aug 2021 14:37:45 +0200 Subject: [PATCH] ubuiltins.float: Document it. Override typed docstrings in order to hide types like SupportsFloat. --- src/ubuiltins/__init__.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ubuiltins/__init__.py b/src/ubuiltins/__init__.py index c2ec941..e3f367e 100644 --- a/src/ubuiltins/__init__.py +++ b/src/ubuiltins/__init__.py @@ -388,8 +388,18 @@ class float: ... def __init__(self, *args) -> None: - """ - Returns a floating point number constructed from a number or string ``x``. + """float() + float(x: int) + float(x: str) + + Creates a floating point number. If no arguments are given, this returns + ``0.0``. + + Arguments: + x: Number or string that will be converted. + + Returns: + The input argument ``x`` converted to a floating point number. """