Improve comments of builtins.function (#6818)

This commit is contained in:
Akuli
2022-01-04 22:04:33 +02:00
committed by GitHub
parent ff64deb331
commit b5666d473d

View File

@@ -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