mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Make `type()` method params positional-only (#6238)
This commit is contained in:
@@ -144,25 +144,25 @@ class type(object):
|
||||
__text_signature__: str | None
|
||||
__weakrefoffset__: int
|
||||
@overload
|
||||
def __init__(self, o: object) -> None: ...
|
||||
def __init__(self, __o: object) -> None: ...
|
||||
@overload
|
||||
def __init__(self, name: str, bases: Tuple[type, ...], dict: dict[str, Any], **kwds: Any) -> None: ...
|
||||
def __init__(self, __name: str, __bases: Tuple[type, ...], __dict: dict[str, Any], **kwds: Any) -> None: ...
|
||||
@overload
|
||||
def __new__(cls, o: object) -> type: ...
|
||||
def __new__(cls, __o: object) -> type: ...
|
||||
@overload
|
||||
def __new__(cls: Type[_TT], name: str, bases: Tuple[type, ...], namespace: dict[str, Any], **kwds: Any) -> _TT: ...
|
||||
def __new__(cls: Type[_TT], __name: str, __bases: Tuple[type, ...], __namespace: dict[str, Any], **kwds: Any) -> _TT: ...
|
||||
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
|
||||
def __subclasses__(self: _TT) -> list[_TT]: ...
|
||||
# Note: the documentation doesnt specify what the return type is, the standard
|
||||
# implementation seems to be returning a list.
|
||||
def mro(self) -> list[type]: ...
|
||||
def __instancecheck__(self, instance: Any) -> bool: ...
|
||||
def __subclasscheck__(self, subclass: type) -> bool: ...
|
||||
def __instancecheck__(self, __instance: Any) -> bool: ...
|
||||
def __subclasscheck__(self, __subclass: type) -> bool: ...
|
||||
@classmethod
|
||||
def __prepare__(metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any) -> Mapping[str, Any]: ...
|
||||
if sys.version_info >= (3, 10):
|
||||
def __or__(self, t: Any) -> types.UnionType: ...
|
||||
def __ror__(self, t: Any) -> types.UnionType: ...
|
||||
def __or__(self, __t: Any) -> types.UnionType: ...
|
||||
def __ror__(self, __t: Any) -> types.UnionType: ...
|
||||
|
||||
class super(object):
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user