mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Various stubtest exceptions (#5227)
This commit is contained in:
@@ -273,36 +273,42 @@ class FrameType:
|
||||
class GetSetDescriptorType:
|
||||
__name__: str
|
||||
__objclass__: type
|
||||
def __get__(self, obj: Any, type: type = ...) -> Any: ...
|
||||
def __set__(self, obj: Any) -> None: ...
|
||||
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
|
||||
def __set__(self, __instance: Any, __value: Any) -> None: ...
|
||||
def __delete__(self, obj: Any) -> None: ...
|
||||
|
||||
class MemberDescriptorType:
|
||||
__name__: str
|
||||
__objclass__: type
|
||||
def __get__(self, obj: Any, type: type = ...) -> Any: ...
|
||||
def __set__(self, obj: Any) -> None: ...
|
||||
def __get__(self, __obj: Any, __type: type = ...) -> Any: ...
|
||||
def __set__(self, __instance: Any, __value: Any) -> None: ...
|
||||
def __delete__(self, obj: Any) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def new_class(
|
||||
name: str, bases: Iterable[object] = ..., kwds: Dict[str, Any] = ..., exec_body: Callable[[Dict[str, Any]], None] = ...
|
||||
name: str,
|
||||
bases: Iterable[object] = ...,
|
||||
kwds: Optional[Dict[str, Any]] = ...,
|
||||
exec_body: Optional[Callable[[Dict[str, Any]], None]] = ...,
|
||||
) -> type: ...
|
||||
def resolve_bases(bases: Iterable[object]) -> Tuple[Any, ...]: ...
|
||||
|
||||
else:
|
||||
def new_class(
|
||||
name: str, bases: Tuple[type, ...] = ..., kwds: Dict[str, Any] = ..., exec_body: Callable[[Dict[str, Any]], None] = ...
|
||||
name: str,
|
||||
bases: Tuple[type, ...] = ...,
|
||||
kwds: Optional[Dict[str, Any]] = ...,
|
||||
exec_body: Optional[Callable[[Dict[str, Any]], None]] = ...,
|
||||
) -> type: ...
|
||||
|
||||
def prepare_class(
|
||||
name: str, bases: Tuple[type, ...] = ..., kwds: Dict[str, Any] = ...
|
||||
name: str, bases: Tuple[type, ...] = ..., kwds: Optional[Dict[str, Any]] = ...
|
||||
) -> Tuple[type, Dict[str, Any], Dict[str, Any]]: ...
|
||||
|
||||
# Actually a different type, but `property` is special and we want that too.
|
||||
DynamicClassAttribute = property
|
||||
|
||||
def coroutine(f: Callable[..., Any]) -> CoroutineType: ...
|
||||
def coroutine(func: Callable[..., Any]) -> CoroutineType: ...
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
class GenericAlias:
|
||||
|
||||
Reference in New Issue
Block a user