erg/crates/erg_compiler/lib/pystd/typing.d.er
2025-02-19 01:07:56 +09:00

158 lines
3.9 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
.Any: ClassType
.LiteralString: ClassType
.Never: ClassType
.NoReturn: ClassType
.Self: ClassType
.TypeAlias: ClassType
.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
.ClassVar: (Type) -> Type
.Final: (Type) -> Type
.Required: (Type) -> Type
.NotRequired: (Type) -> Type
.Annotated: (Type, *Obj) -> Type
.TypeGuard: (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; _]
__call__: (
Str,
*constraints: Type,
bound := Type,
covariant := Bool,
contravariant := Bool,
infer_variance := Bool,
) -> Type
.TypeVarTuple: ClassType
.TypeVarTuple.
__name__: Str
__call__: (Str) -> Type
.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: (Type := NoneType) -> 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; _]
.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