mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-03 05:54:33 +00:00
Update typing.d.er
This commit is contained in:
parent
ba6d8946df
commit
3af0acd390
1 changed files with 37 additions and 8 deletions
|
@ -35,12 +35,24 @@
|
||||||
|
|
||||||
.TYPE_CHECKING: Bool
|
.TYPE_CHECKING: Bool
|
||||||
|
|
||||||
|
._SpecialForm: ClassType
|
||||||
|
._SpecialForm <: Type
|
||||||
|
._SpecialForm.
|
||||||
|
__call__: (getitem: GenericCallable) -> _SpecialForm
|
||||||
|
|
||||||
.Any: ClassType
|
.Any: ClassType
|
||||||
.LiteralString: ClassType
|
.LiteralString: ClassType
|
||||||
.Never: ClassType
|
.Never: _SpecialForm
|
||||||
.NoReturn: ClassType
|
.NoReturn: _SpecialForm
|
||||||
.Self: ClassType
|
.NoDefault: ClassType
|
||||||
.TypeAlias: ClassType
|
.Self: _SpecialForm
|
||||||
|
.TypeAlias: _SpecialForm
|
||||||
|
.TypeAliasType: ClassType
|
||||||
|
.TypeAliasType.
|
||||||
|
__name__: Str
|
||||||
|
__module__: Str
|
||||||
|
__type_params__: [Type; _]
|
||||||
|
__value__: Type
|
||||||
.Tuple: ClassType
|
.Tuple: ClassType
|
||||||
.Tuple.
|
.Tuple.
|
||||||
__getitem__: (Type or HomogenousTuple Type) -> Type
|
__getitem__: (Type or HomogenousTuple Type) -> Type
|
||||||
|
@ -55,12 +67,17 @@
|
||||||
.Literal: ClassType
|
.Literal: ClassType
|
||||||
.Literal.
|
.Literal.
|
||||||
__getitem__: (Obj or HomogenousTuple Obj) -> Type
|
__getitem__: (Obj or HomogenousTuple Obj) -> Type
|
||||||
|
.ForwardRef: ClassType
|
||||||
|
.ForwardRef.
|
||||||
|
__getitem__: (Type) -> Type
|
||||||
.ClassVar: (Type) -> Type
|
.ClassVar: (Type) -> Type
|
||||||
.Final: (Type) -> Type
|
.Final: (Type) -> Type
|
||||||
|
.ReadOnly: (Type) -> Type
|
||||||
.Required: (Type) -> Type
|
.Required: (Type) -> Type
|
||||||
.NotRequired: (Type) -> Type
|
.NotRequired: (Type) -> Type
|
||||||
.Annotated: (Type, *Obj) -> Type
|
.Annotated: (Type, *Obj) -> Type
|
||||||
.TypeGuard: (Type) -> Type
|
.TypeGuard: (Type) -> Type
|
||||||
|
.TypeIs: (Type) -> Type
|
||||||
.Generic: ClassType
|
.Generic: ClassType
|
||||||
.Generic.
|
.Generic.
|
||||||
__getitem__: (*Type) -> Type
|
__getitem__: (*Type) -> Type
|
||||||
|
@ -72,18 +89,26 @@
|
||||||
__infer_variance__: Bool
|
__infer_variance__: Bool
|
||||||
__bound__: Type or NoneType
|
__bound__: Type or NoneType
|
||||||
__constraints__: [Type; _]
|
__constraints__: [Type; _]
|
||||||
|
__default__: Type or NoneType
|
||||||
__call__: (
|
__call__: (
|
||||||
Str,
|
name: Str,
|
||||||
*constraints: Type,
|
*constraints: Type,
|
||||||
bound := Type,
|
bound := Type,
|
||||||
covariant := Bool,
|
covariant := Bool,
|
||||||
contravariant := Bool,
|
contravariant := Bool,
|
||||||
infer_variance := Bool,
|
infer_variance := Bool,
|
||||||
) -> Type
|
default := Type,
|
||||||
|
) -> TypeVar
|
||||||
|
has_default: (self: TypeVar) -> Bool
|
||||||
.TypeVarTuple: ClassType
|
.TypeVarTuple: ClassType
|
||||||
.TypeVarTuple.
|
.TypeVarTuple.
|
||||||
__name__: Str
|
__name__: Str
|
||||||
__call__: (Str) -> Type
|
__default__: Type or NoneType
|
||||||
|
__call__: (
|
||||||
|
name : Str,
|
||||||
|
default := Type,
|
||||||
|
) -> TypeVarTuple
|
||||||
|
has_default: (self: TypeVarTuple) -> Bool
|
||||||
.Unpack: (Type) -> Type
|
.Unpack: (Type) -> Type
|
||||||
.ParamSpecArgs: ClassType
|
.ParamSpecArgs: ClassType
|
||||||
.ParamSpecKwargs: ClassType
|
.ParamSpecKwargs: ClassType
|
||||||
|
@ -94,7 +119,9 @@
|
||||||
kwargs: ParamSpecKwargs
|
kwargs: ParamSpecKwargs
|
||||||
__call__: (Str, bound := Type, covariant := Bool, contravariant := Bool) -> ParamSpec
|
__call__: (Str, bound := Type, covariant := Bool, contravariant := Bool) -> ParamSpec
|
||||||
.AnyStr: ClassType
|
.AnyStr: ClassType
|
||||||
.Protocol: (Type := NoneType) -> Type
|
.Protocol: ClassType
|
||||||
|
.Protocol.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
.NamedTuple: ClassType
|
.NamedTuple: ClassType
|
||||||
.NamedTuple.
|
.NamedTuple.
|
||||||
__call__: (typename: Str, it := global::Iterable(Obj)) -> Type
|
__call__: (typename: Str, it := global::Iterable(Obj)) -> Type
|
||||||
|
@ -136,6 +163,8 @@
|
||||||
.get_type_hints: (obj: Obj, globalns: {Str: Obj}, localns: {Str: Obj}) -> {Str: Obj}
|
.get_type_hints: (obj: Obj, globalns: {Str: Obj}, localns: {Str: Obj}) -> {Str: Obj}
|
||||||
.get_origin: (type: Type) -> Type
|
.get_origin: (type: Type) -> Type
|
||||||
.get_overloads: (func: GenericCallable) -> [Obj; _]
|
.get_overloads: (func: GenericCallable) -> [Obj; _]
|
||||||
|
.get_protocol_members: (tp: Protocol) -> FrozenSet Str
|
||||||
|
.is_protocol: (tp: Type) -> Bool
|
||||||
.is_typeddict: (type: Type) -> Bool
|
.is_typeddict: (type: Type) -> Bool
|
||||||
.no_type_check: |C <: GenericCallable|(func: C) -> C
|
.no_type_check: |C <: GenericCallable|(func: C) -> C
|
||||||
.no_type_check_decorator: |C <: GenericCallable|(func: C) -> C
|
.no_type_check_decorator: |C <: GenericCallable|(func: C) -> C
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue