mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-22 19:13:34 +08:00
Various stdlib dunders: correct parameter names; improve types; add defaults (#9761)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -103,9 +103,9 @@ class FunctionType:
|
||||
) -> None: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
@overload
|
||||
def __get__(self, obj: None, type: type) -> FunctionType: ...
|
||||
def __get__(self, __instance: None, __owner: type) -> FunctionType: ...
|
||||
@overload
|
||||
def __get__(self, obj: object, type: type | None = ...) -> MethodType: ...
|
||||
def __get__(self, __instance: object, __owner: type | None = None) -> MethodType: ...
|
||||
|
||||
LambdaType = FunctionType
|
||||
|
||||
@@ -454,7 +454,7 @@ class WrapperDescriptorType:
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
|
||||
def __get__(self, __instance: Any, __owner: type | None = None) -> Any: ...
|
||||
|
||||
@final
|
||||
class MethodWrapperType:
|
||||
@@ -479,7 +479,7 @@ class MethodDescriptorType:
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, obj: Any, type: type = ...) -> Any: ...
|
||||
def __get__(self, __instance: Any, __owner: type | None = None) -> Any: ...
|
||||
|
||||
@final
|
||||
class ClassMethodDescriptorType:
|
||||
@@ -490,7 +490,7 @@ class ClassMethodDescriptorType:
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
def __get__(self, obj: Any, type: type = ...) -> Any: ...
|
||||
def __get__(self, __instance: Any, __owner: type | None = None) -> Any: ...
|
||||
|
||||
@final
|
||||
class TracebackType:
|
||||
@@ -536,7 +536,7 @@ class GetSetDescriptorType:
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
|
||||
def __get__(self, __instance: Any, __owner: type | None = None) -> Any: ...
|
||||
def __set__(self, __instance: Any, __value: Any) -> None: ...
|
||||
def __delete__(self, __obj: Any) -> None: ...
|
||||
|
||||
@@ -548,7 +548,7 @@ class MemberDescriptorType:
|
||||
def __qualname__(self) -> str: ...
|
||||
@property
|
||||
def __objclass__(self) -> type: ...
|
||||
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
|
||||
def __get__(self, __instance: Any, __owner: type | None = None) -> Any: ...
|
||||
def __set__(self, __instance: Any, __value: Any) -> None: ...
|
||||
def __delete__(self, __obj: Any) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user