erg/crates/erg_compiler/lib/pystd/typing.d.er
Shunsuke Shibayama 3af0acd390 Update typing.d.er
2025-02-23 14:00:22 +09:00

187 lines
4.6 KiB
Python

{
.Callable;
.Collection;
.Container;
.ItemsView;
.KeysView;
.ValuesView;
.Iterable;
.Iterator;
.MutableSet;
.Mapping;
.MappingView;
.MutableMapping;
.Sequence;
.MutableSequence;
.Coroutine;
.AsyncIterable;
.AsyncIterator;
.AsyncGenerator;
.Awaitable;
.Generator;
.Hashable;
.Reversible;
.Sized;
.ContextManager;
.AsyncContextManager;
} = pyimport "collections/abc"
{
.DefaultDict;
.OrderedDict!;
.ChainMap;
.Counter!;
.Deque!;
} = pyimport "collections"
.TYPE_CHECKING: Bool
._SpecialForm: ClassType
._SpecialForm <: Type
._SpecialForm.
__call__: (getitem: GenericCallable) -> _SpecialForm
.Any: ClassType
.LiteralString: ClassType
.Never: _SpecialForm
.NoReturn: _SpecialForm
.NoDefault: ClassType
.Self: _SpecialForm
.TypeAlias: _SpecialForm
.TypeAliasType: ClassType
.TypeAliasType.
__name__: Str
__module__: Str
__type_params__: [Type; _]
__value__: Type
.Tuple: ClassType
.Tuple.
__getitem__: (Type or HomogenousTuple Type) -> Type
.Union: ClassType
.Union.
__getitem__: (Type or HomogenousTuple Type) -> Type
.Optional: ClassType
.Optional.
__getitem__: (Type or HomogenousTuple Type) -> Type
.Concatenate: (*Type) -> Type
.Type: (Type) -> Type
.Literal: ClassType
.Literal.
__getitem__: (Obj or HomogenousTuple Obj) -> Type
.ForwardRef: ClassType
.ForwardRef.
__getitem__: (Type) -> Type
.ClassVar: (Type) -> Type
.Final: (Type) -> Type
.ReadOnly: (Type) -> Type
.Required: (Type) -> Type
.NotRequired: (Type) -> Type
.Annotated: (Type, *Obj) -> Type
.TypeGuard: (Type) -> Type
.TypeIs: (Type) -> Type
.Generic: ClassType
.Generic.
__getitem__: (*Type) -> Type
.TypeVar: ClassType
.TypeVar.
__name__: Str
__covariant__: Bool
__contravariant__: Bool
__infer_variance__: Bool
__bound__: Type or NoneType
__constraints__: [Type; _]
__default__: Type or NoneType
__call__: (
name: Str,
*constraints: Type,
bound := Type,
covariant := Bool,
contravariant := Bool,
infer_variance := Bool,
default := Type,
) -> TypeVar
has_default: (self: TypeVar) -> Bool
.TypeVarTuple: ClassType
.TypeVarTuple.
__name__: Str
__default__: Type or NoneType
__call__: (
name : Str,
default := Type,
) -> TypeVarTuple
has_default: (self: TypeVarTuple) -> Bool
.Unpack: (Type) -> Type
.ParamSpecArgs: ClassType
.ParamSpecKwargs: ClassType
.ParamSpec: ClassType
.ParamSpec.
__name__: Str
args: ParamSpecArgs
kwargs: ParamSpecKwargs
__call__: (Str, bound := Type, covariant := Bool, contravariant := Bool) -> ParamSpec
.AnyStr: ClassType
.Protocol: ClassType
.Protocol.
__getitem__: (ty := Type) -> Type
.NamedTuple: ClassType
.NamedTuple.
__call__: (typename: Str, it := global::Iterable(Obj)) -> Type
.NewType: ClassType
.NewType.
__module__: Str
__name__: Str
__supertype__: Type
__call__: (name: Str, tp: Type) -> NewType
.TypedDict: (typename: Str, it := global::Iterable(Obj)) -> Type
.Dict: (Type, Type) -> Type
.List: (Type) -> Type
.Set: (Type) -> Type
.FrozenSet: (Type) -> ClassType
.FrozenSet.
__getitem__: Type -> Type
.IO: Type -> ClassType
.IO.
__call__: () -> IO Obj
__getitem__: (Type) -> Type
.TextIO: ClassType
.TextIO <: IO Str
.TextIO.
__call__: () -> TextIO
.BinaryIO: ClassType
.BinaryIO <: IO Bytes
.BinaryIO.
__call__: () -> BinaryIO
.Pattern: ClassType
.Match: ClassType
.Text: ClassType
.assert_never: (arg: Obj) -> NoneType
.assert_type: (val: Obj, typ: Type) -> NoneType
.cast: |T|(typ: {T}, val: Obj) -> T
.clear_overloads!: () => NoneType
.final: |C <: GenericCallable or Type|(func_or_type: C) -> C
.get_args: (type: Type) -> [Type; _]
.get_type_hints: (obj: Obj, globalns: {Str: Obj}, localns: {Str: Obj}) -> {Str: Obj}
.get_origin: (type: Type) -> Type
.get_overloads: (func: GenericCallable) -> [Obj; _]
.get_protocol_members: (tp: Protocol) -> FrozenSet Str
.is_protocol: (tp: Type) -> Bool
.is_typeddict: (type: Type) -> Bool
.no_type_check: |C <: GenericCallable|(func: C) -> C
.no_type_check_decorator: |C <: GenericCallable|(func: C) -> C
.overload: |C <: GenericCallable|(func: C) -> C
.override: |C <: GenericCallable|(func: C) -> C
.reveal_type: (obj: Obj) -> NoneType
.type_check_only: |C <: GenericCallable|(func: C) -> C
.runtime_checkable: (cls: Type) -> Type
.AbstractSet: ClassType
.AbstractSet.
__getitem__: (Type) -> Type
.ByteString: ClassType
.SupportsAbs: ClassType
.SupportsBytes: ClassType
.SupportsComplex: ClassType
.SupportsFloat: ClassType
.SupportsIndex: ClassType
.SupportsInt: ClassType
.SupportsRound: ClassType