mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Add missing function attributes to builtins.function (#6804)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -39,6 +39,7 @@ class _Cell:
|
||||
__hash__: None # type: ignore[assignment]
|
||||
cell_contents: Any
|
||||
|
||||
# Make sure this class definition stays roughly in line with `builtins.function`
|
||||
@final
|
||||
class FunctionType:
|
||||
__closure__: tuple[_Cell, ...] | None
|
||||
@@ -59,7 +60,7 @@ class FunctionType:
|
||||
closure: tuple[_Cell, ...] | None = ...,
|
||||
) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, obj: object | None, type: type | None) -> MethodType: ...
|
||||
def __get__(self, obj: object | None, type: type | None = ...) -> MethodType: ...
|
||||
|
||||
LambdaType = FunctionType
|
||||
|
||||
|
||||
Reference in New Issue
Block a user