mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Improve annotations for __instancecheck__, __subclasscheck__ (#9291)
This commit is contained in:
@@ -18,8 +18,8 @@ class ABCMeta(type):
|
||||
else:
|
||||
def __new__(mcls: type[Self], name: str, bases: tuple[type, ...], namespace: dict[str, Any], **kwargs: Any) -> Self: ...
|
||||
|
||||
def __instancecheck__(cls: ABCMeta, instance: Any) -> Any: ...
|
||||
def __subclasscheck__(cls: ABCMeta, subclass: Any) -> Any: ...
|
||||
def __instancecheck__(cls: ABCMeta, instance: Any) -> bool: ...
|
||||
def __subclasscheck__(cls: ABCMeta, subclass: type) -> bool: ...
|
||||
def _dump_registry(cls: ABCMeta, file: SupportsWrite[str] | None = ...) -> None: ...
|
||||
def register(cls: ABCMeta, subclass: type[_T]) -> type[_T]: ...
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class Error(Exception): ...
|
||||
class TypeTransformationError(Error): ...
|
||||
|
||||
class DescriptorMetaclass(type):
|
||||
def __instancecheck__(self, obj): ...
|
||||
def __instancecheck__(self, obj: Any) -> bool: ...
|
||||
|
||||
_internal_create_key: object
|
||||
|
||||
|
||||
Reference in New Issue
Block a user