mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-17 17:35:03 +08:00
Tests for Type[]
This commit is contained in:
@@ -17,7 +17,7 @@ from jedi.evaluate.helpers import is_string
|
||||
from jedi.evaluate.imports import Importer
|
||||
from jedi.evaluate.context import ClassContext
|
||||
|
||||
_PROXY_CLASS_TYPES = 'Tuple Generic Protocol'.split()
|
||||
_PROXY_CLASS_TYPES = 'Tuple Generic Protocol Callable Type'.split()
|
||||
_TYPE_ALIAS_TYPES = {
|
||||
'List': 'builtins.list',
|
||||
'Dict': 'builtins.dict',
|
||||
@@ -28,7 +28,7 @@ _TYPE_ALIAS_TYPES = {
|
||||
'DefaultDict': 'collections.defaultdict',
|
||||
'Deque': 'collections.deque',
|
||||
}
|
||||
_PROXY_TYPES = 'Optional Union Callable Type ClassVar'.split()
|
||||
_PROXY_TYPES = 'Optional Union ClassVar'.split()
|
||||
|
||||
|
||||
class TypingName(AbstractTreeName):
|
||||
@@ -76,7 +76,6 @@ class TypingModuleName(NameWrapper):
|
||||
return ContextSet.from_iterable(self._remap())
|
||||
|
||||
def _remap(self):
|
||||
# TODO we don't want the SpecialForm bullshit
|
||||
name = self.string_name
|
||||
evaluator = self.parent_context.evaluator
|
||||
try:
|
||||
|
||||
@@ -330,3 +330,7 @@ else:
|
||||
with_type_checking
|
||||
#?
|
||||
without_type_checking
|
||||
|
||||
def foo() -> typing.Type[int]: pass
|
||||
#? int
|
||||
foo()
|
||||
|
||||
Reference in New Issue
Block a user