mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 04:09:05 +00:00
fix: incorrect type declarations
This commit is contained in:
parent
79e493b3c3
commit
cc996020be
2 changed files with 75 additions and 79 deletions
|
@ -1,37 +1,70 @@
|
||||||
# The ABCs in this file are not defined as a collection of traits.
|
# The ABCs in this file are not defined as a collection of traits.
|
||||||
# Use `std/abc` instead.
|
# Use `std/abc` instead.
|
||||||
.Container: ClassType
|
.Container: ClassType
|
||||||
|
.Container.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
|
.Generator: ClassType
|
||||||
|
.Generator.
|
||||||
|
__getitem__: (t: (Type, Type, Type)) -> Type
|
||||||
.Hashable: ClassType
|
.Hashable: ClassType
|
||||||
.Sized: ClassType
|
.Sized: ClassType
|
||||||
.Callable: ClassType
|
.Callable: ClassType
|
||||||
.Callable.
|
.Callable.
|
||||||
__getitem__: (params: [Type; _], Type) -> Type
|
__getitem__: (Type or HomogenousTuple(Type), Type) -> Type
|
||||||
.Iterable: ClassType
|
.Iterable: ClassType
|
||||||
.Iterable.
|
.Iterable.
|
||||||
__getitem__: Type -> Type
|
__getitem__: (ty := Type) -> Type
|
||||||
.Collection: ClassType
|
.Collection: ClassType
|
||||||
|
.Collection.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
.Iterator: ClassType
|
.Iterator: ClassType
|
||||||
.Iterator.
|
.Iterator.
|
||||||
__getitem__: Type -> Type
|
__getitem__: (ty := Type) -> Type
|
||||||
.Reversible: ClassType
|
.Reversible: ClassType
|
||||||
.Genertor: ClassType
|
|
||||||
.Sequence: ClassType
|
.Sequence: ClassType
|
||||||
.Sequence.
|
.Sequence.
|
||||||
__getitem__: Type -> Type
|
__getitem__: (ty := Type) -> Type
|
||||||
.MutableSequence: ClassType
|
.MutableSequence: ClassType
|
||||||
|
.MutableSequence.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
|
.MutableSet: ClassType
|
||||||
|
.MutableSet.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
.ByteString: ClassType
|
.ByteString: ClassType
|
||||||
.Set: ClassType
|
.Set: ClassType
|
||||||
.MutableSet: ClassType
|
.Set.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
.Mapping: ClassType
|
.Mapping: ClassType
|
||||||
.Mapping.
|
.Mapping.
|
||||||
__getitem__: (Type, Type) -> Type
|
__getitem__: (kv: (Type, Type)) -> Type
|
||||||
.MutableMapping: ClassType
|
.MutableMapping: ClassType
|
||||||
|
.MutableMapping.
|
||||||
|
__getitem__: (kv: (Type, Type)) -> Type
|
||||||
.MappingView: ClassType
|
.MappingView: ClassType
|
||||||
.ItemsView: ClassType
|
.ItemsView: ClassType
|
||||||
.KeysView: ClassType
|
.KeysView: ClassType
|
||||||
.ValuesView: ClassType
|
.ValuesView: ClassType
|
||||||
.Awaitable: ClassType
|
.Awaitable: ClassType
|
||||||
|
.Awaitable.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
.Coroutine: ClassType
|
.Coroutine: ClassType
|
||||||
|
.Coroutine.
|
||||||
|
__getitem__: (t := (Type, Type, Type)) -> Type
|
||||||
.AsyncIterable: ClassType
|
.AsyncIterable: ClassType
|
||||||
|
.AsyncIterable.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
.AsyncIterator: ClassType
|
.AsyncIterator: ClassType
|
||||||
|
.AsyncIterator.
|
||||||
|
__getitem__: (ty := Type) -> Type
|
||||||
.AsyncGenerator: ClassType
|
.AsyncGenerator: ClassType
|
||||||
|
.AsyncGenerator.
|
||||||
|
__getitem__: (t := (Type, Type, Type)) -> Type
|
||||||
|
.ContextManager: ClassType
|
||||||
|
.ContextManager.
|
||||||
|
__enter__: (self: ContextManager) -> ContextManager
|
||||||
|
__exit__: (self: ContextManager, exc_type: Type, exc_value: Obj, traceback: Obj) -> NoneType
|
||||||
|
.AsyncContextManager: ClassType
|
||||||
|
.AsyncContextManager.
|
||||||
|
__aenter__: (self: AsyncContextManager) -> AsyncContextManager
|
||||||
|
__aexit__: (self: AsyncContextManager, exc_type: Type, exc_value: Obj, traceback: Obj) -> NoneType
|
||||||
|
.Buffer: ClassType
|
||||||
|
|
|
@ -1,3 +1,38 @@
|
||||||
|
{
|
||||||
|
.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
|
.TYPE_CHECKING: Bool
|
||||||
|
|
||||||
.Any: ClassType
|
.Any: ClassType
|
||||||
|
@ -15,9 +50,6 @@
|
||||||
.Optional: ClassType
|
.Optional: ClassType
|
||||||
.Optional.
|
.Optional.
|
||||||
__getitem__: (Type or HomogenousTuple Type) -> Type
|
__getitem__: (Type or HomogenousTuple Type) -> Type
|
||||||
.Callable: ClassType
|
|
||||||
.Callable.
|
|
||||||
__getitem__: (Type or HomogenousTuple Type) -> Type
|
|
||||||
.Concatenate: (*Type) -> Type
|
.Concatenate: (*Type) -> Type
|
||||||
.Type: (Type) -> Type
|
.Type: (Type) -> Type
|
||||||
.Literal: ClassType
|
.Literal: ClassType
|
||||||
|
@ -79,15 +111,6 @@
|
||||||
.FrozenSet: (Type) -> ClassType
|
.FrozenSet: (Type) -> ClassType
|
||||||
.FrozenSet.
|
.FrozenSet.
|
||||||
__getitem__: Type -> Type
|
__getitem__: Type -> Type
|
||||||
.OrderedDict: (Type, Type) -> ClassType
|
|
||||||
.OrderedDict.
|
|
||||||
__getitem__: (kv: (Type, Type)) -> Type
|
|
||||||
.ChainMap: (Type, Type) -> Type
|
|
||||||
.Counter: (Type, Int) -> Type
|
|
||||||
.Deque: (T: Type) -> ClassType
|
|
||||||
.Deque.
|
|
||||||
__call__: |T|(iter: global::Iterable(T)) -> Deque T
|
|
||||||
__getitem__: (Type) -> Type
|
|
||||||
.IO: Type -> ClassType
|
.IO: Type -> ClassType
|
||||||
.IO.
|
.IO.
|
||||||
__call__: () -> IO Obj
|
__call__: () -> IO Obj
|
||||||
|
@ -103,9 +126,6 @@
|
||||||
.Pattern: ClassType
|
.Pattern: ClassType
|
||||||
.Match: ClassType
|
.Match: ClassType
|
||||||
.Text: ClassType
|
.Text: ClassType
|
||||||
.Sequence: ClassType
|
|
||||||
.Sequence.
|
|
||||||
__getitem__: (Type) -> Type
|
|
||||||
|
|
||||||
.assert_never: (arg: Obj) -> NoneType
|
.assert_never: (arg: Obj) -> NoneType
|
||||||
.assert_type: (val: Obj, typ: Type) -> NoneType
|
.assert_type: (val: Obj, typ: Type) -> NoneType
|
||||||
|
@ -129,56 +149,6 @@
|
||||||
.AbstractSet.
|
.AbstractSet.
|
||||||
__getitem__: (Type) -> Type
|
__getitem__: (Type) -> Type
|
||||||
.ByteString: ClassType
|
.ByteString: ClassType
|
||||||
.Container: ClassType
|
|
||||||
.ContextManager: ClassType
|
|
||||||
.ContextManager.
|
|
||||||
__enter__: (self: ContextManager) -> ContextManager
|
|
||||||
__exit__: (self: ContextManager, exc_type: Type, exc_value: Obj, traceback: Obj) -> NoneType
|
|
||||||
.Hashable: ClassType
|
|
||||||
.ItemsView: ClassType
|
|
||||||
.Iterable: ClassType
|
|
||||||
.Iterable.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
.Iterator: ClassType
|
|
||||||
.Iterator.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
.KeysView: ClassType
|
|
||||||
.Mapping: ClassType
|
|
||||||
.Mapping.
|
|
||||||
__getitem__: (kv: (Type, Type)) -> Type
|
|
||||||
.MappingView: ClassType
|
|
||||||
.MappingView.
|
|
||||||
__getitem__: (Type) -> Type
|
|
||||||
.MutableMapping: ClassType
|
|
||||||
.MutableMapping.
|
|
||||||
__getitem__: (kv: (Type, Type)) -> Type
|
|
||||||
.MutableSequence: ClassType
|
|
||||||
.MutableSequence.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
.MutableSet: ClassType
|
|
||||||
.MutableSet.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
.Sized: ClassType
|
|
||||||
.ValuesView: ClassType
|
|
||||||
.Awaitable: ClassType
|
|
||||||
.AsyncIterator: ClassType
|
|
||||||
.AsyncIterator.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
.AsyncIterable: ClassType
|
|
||||||
.AsyncIterable.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
.Coroutine: ClassType
|
|
||||||
.Coroutine.
|
|
||||||
__getitem__: (t: (Type, Type, Type)) -> Type
|
|
||||||
.Collection: ClassType
|
|
||||||
.Collection.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
.AsyncGenerator: ClassType
|
|
||||||
.AsyncGenerator.
|
|
||||||
__getitem__: (t: (Type, Type)) -> Type
|
|
||||||
.AsyncContextManager: ClassType
|
|
||||||
.AsyncContextManager.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
.SupportsAbs: ClassType
|
.SupportsAbs: ClassType
|
||||||
.SupportsBytes: ClassType
|
.SupportsBytes: ClassType
|
||||||
.SupportsComplex: ClassType
|
.SupportsComplex: ClassType
|
||||||
|
@ -186,10 +156,3 @@
|
||||||
.SupportsIndex: ClassType
|
.SupportsIndex: ClassType
|
||||||
.SupportsInt: ClassType
|
.SupportsInt: ClassType
|
||||||
.SupportsRound: ClassType
|
.SupportsRound: ClassType
|
||||||
|
|
||||||
.Generator: ClassType
|
|
||||||
.Generator.
|
|
||||||
__getitem__: (t: (Type, Type, Type)) -> Type
|
|
||||||
.Reversible: ClassType
|
|
||||||
.Reversible.
|
|
||||||
__getitem__: Type -> Type
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue