mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-15 06:22:02 +08:00
typing: minor changes (#3933)
* typing: fix argument names of cast * typing: use private _Alias class For py37 and above, this is _GenericAlias, for py36 and below it's _TypeAlias. I don't think we need to make typing.pyi definitions correspond more precisely, but we should avoid leaking a typing.TypeAlias class
This commit is contained in:
@@ -71,10 +71,8 @@ typing.MutableSequence.remove
|
||||
typing.MutableSet.add
|
||||
typing.MutableSet.discard
|
||||
typing.MutableSet.remove
|
||||
typing.Protocol
|
||||
typing.Sequence.count
|
||||
typing.Sequence.index
|
||||
typing.Type
|
||||
typing.runtime_checkable
|
||||
unittest.async_case
|
||||
uuid.UUID.int
|
||||
|
||||
@@ -71,10 +71,8 @@ typing.MutableSequence.remove
|
||||
typing.MutableSet.add
|
||||
typing.MutableSet.discard
|
||||
typing.MutableSet.remove
|
||||
typing.Protocol
|
||||
typing.Sequence.count
|
||||
typing.Sequence.index
|
||||
typing.Type
|
||||
typing.runtime_checkable
|
||||
unittest.async_case
|
||||
urllib.parse.parse_qs
|
||||
|
||||
@@ -66,36 +66,6 @@ tracemalloc.Traceback.format
|
||||
types.ClassMethodDescriptorType.__get__
|
||||
types.MethodDescriptorType.__get__
|
||||
types.WrapperDescriptorType.__get__
|
||||
typing.AbstractSet
|
||||
typing.AsyncContextManager
|
||||
typing.AsyncGenerator
|
||||
typing.AsyncIterable
|
||||
typing.AsyncIterator
|
||||
typing.Awaitable
|
||||
typing.ByteString
|
||||
typing.Collection
|
||||
typing.Container
|
||||
typing.ContextManager
|
||||
typing.Coroutine
|
||||
typing.Generator
|
||||
typing.GenericMeta
|
||||
typing.Hashable
|
||||
typing.ItemsView
|
||||
typing.Iterable
|
||||
typing.Iterator
|
||||
typing.KeysView
|
||||
typing.Mapping
|
||||
typing.MappingView
|
||||
typing.MutableMapping
|
||||
typing.MutableSequence
|
||||
typing.MutableSet
|
||||
typing.Optional
|
||||
typing.Protocol
|
||||
typing.Reversible
|
||||
typing.Sequence
|
||||
typing.Sized
|
||||
typing.Union
|
||||
typing.ValuesView
|
||||
typing.runtime_checkable
|
||||
unittest.async_case
|
||||
urllib.parse.parse_qs
|
||||
|
||||
@@ -148,35 +148,6 @@ types.ClassMethodDescriptorType.__get__
|
||||
types.CodeType.replace
|
||||
types.MethodDescriptorType.__get__
|
||||
types.WrapperDescriptorType.__get__
|
||||
typing.AbstractSet
|
||||
typing.AsyncContextManager
|
||||
typing.AsyncGenerator
|
||||
typing.AsyncIterable
|
||||
typing.AsyncIterator
|
||||
typing.Awaitable
|
||||
typing.ByteString
|
||||
typing.Collection
|
||||
typing.Container
|
||||
typing.ContextManager
|
||||
typing.Coroutine
|
||||
typing.Generator
|
||||
typing.GenericMeta
|
||||
typing.Hashable
|
||||
typing.ItemsView
|
||||
typing.Iterable
|
||||
typing.Iterator
|
||||
typing.KeysView
|
||||
typing.Mapping
|
||||
typing.MappingView
|
||||
typing.MutableMapping
|
||||
typing.MutableSequence
|
||||
typing.MutableSet
|
||||
typing.Optional
|
||||
typing.Reversible
|
||||
typing.Sequence
|
||||
typing.Sized
|
||||
typing.Union
|
||||
typing.ValuesView
|
||||
unittest.TestCase.addCleanup
|
||||
unittest.case.TestCase.addCleanup
|
||||
unittest.doModuleCleanups
|
||||
|
||||
@@ -510,17 +510,12 @@ types.coroutine
|
||||
types.new_class
|
||||
types.prepare_class
|
||||
typing.AwaitableGenerator
|
||||
typing.Generic
|
||||
typing.IO.__iter__
|
||||
typing.IO.__next__
|
||||
typing.IO.closed
|
||||
typing.Match
|
||||
typing.NamedTuple._asdict
|
||||
typing.NamedTuple._make
|
||||
typing.NamedTuple._replace
|
||||
typing.Pattern
|
||||
typing.TypeAlias
|
||||
typing.cast
|
||||
typing.type_check_only
|
||||
unittest.TestCase.assertAlmostEqual
|
||||
unittest.TestCase.assertDictContainsSubset
|
||||
@@ -592,6 +587,8 @@ builtins.quit
|
||||
# Builtins that mypy pretends exist
|
||||
builtins.reveal_locals
|
||||
builtins.reveal_type
|
||||
# Various classes in typing aren't types at runtime. In addition, mypy thinks some special forms are tautologically defined.
|
||||
typing.[A-Z]\w+
|
||||
# We can't distinguish not having a default value from having a default value of inspect.Parameter.empty
|
||||
inspect.Parameter.__init__
|
||||
inspect.Signature.__init__
|
||||
|
||||
Reference in New Issue
Block a user