From b5666d473d0cd77bd5692c2f3a8d8d08cec2615a Mon Sep 17 00:00:00 2001 From: Akuli Date: Tue, 4 Jan 2022 22:04:33 +0200 Subject: [PATCH] Improve comments of builtins.function (#6818) --- stdlib/builtins.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index f1c1b864f..5547afc21 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -764,10 +764,10 @@ class tuple(Sequence[_T_co], Generic[_T_co]): if sys.version_info >= (3, 9): def __class_getitem__(cls, __item: Any) -> GenericAlias: ... -# Make sure this class definition stays roughly in line with `types.FunctionType` +# Doesn't exist at runtime, but deleting this breaks mypy. See #2999 @final class function: - # TODO not defined in builtins! + # Make sure this class definition stays roughly in line with `types.FunctionType` __closure__: tuple[_Cell, ...] | None __code__: CodeType __defaults__: tuple[Any, ...] | None