From eb061f712b73a0f6ba9f2a41dfe9eff548663e68 Mon Sep 17 00:00:00 2001 From: Shunsuke Shibayama Date: Sat, 22 Jun 2024 10:50:02 +0900 Subject: [PATCH] Update typing.d.er --- crates/erg_compiler/lib/pystd/typing.d.er | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/crates/erg_compiler/lib/pystd/typing.d.er b/crates/erg_compiler/lib/pystd/typing.d.er index c4b0b9afe..5f65daae5 100644 --- a/crates/erg_compiler/lib/pystd/typing.d.er +++ b/crates/erg_compiler/lib/pystd/typing.d.er @@ -1,3 +1,5 @@ +.TYPE_CHECKING: Bool + .Any: ClassType .LiteralString: ClassType .Never: ClassType @@ -61,9 +63,13 @@ .Sequence. __getitem__: (Type) -> Type -.cast: |T|(typ: {T}, val: Obj) -> T -.assert_type: (val: Obj, typ: Type) -> NoneType .assert_never: (arg: Obj) -> NoneType +.assert_type: (val: Obj, typ: Type) -> NoneType +.cast: |T|(typ: {T}, val: Obj) -> T +.final: |C <: GenericCallable or Type|(func_or_type: C) -> C +.get_type_hints: (obj: Obj, globalns: {Str: Obj}, localns: {Str: Obj}) -> {Str: Obj} +.overload: |C <: GenericCallable|(func: C) -> C +.override: |C <: GenericCallable|(func: C) -> C .reveal_type: (obj: Obj) -> NoneType .AbstractSet: ClassType @@ -100,6 +106,13 @@ .Collection: ClassType .AsyncGenerator: ClassType .AsyncContextManager: ClassType +.SupportsAbs: ClassType +.SupportsBytes: ClassType +.SupportsComplex: ClassType +.SupportsFloat: ClassType +.SupportsIndex: ClassType +.SupportsInt: ClassType +.SupportsRound: ClassType .Genertor: ClassType .Reversible: ClassType