1
0
forked from VimPlug/jedi

Don't use globals anymore

This commit is contained in:
Dave Halter
2019-12-09 00:15:21 +01:00
parent 33224ae7e1
commit 28ecc2709a

View File

@@ -116,7 +116,13 @@ class TypingValueWithIndex(BaseTypingValueWithGenerics):
# For now don't do anything here, ClassVars are always used. # For now don't do anything here, ClassVars are always used.
return self._generics_manager[0].execute_annotation() return self._generics_manager[0].execute_annotation()
cls = globals()[string_name] mapped = {
'Tuple': Tuple,
'Generic': Generic,
'Protocol': Protocol,
'Callable': Callable,
}
cls = mapped[string_name]
return ValueSet([cls( return ValueSet([cls(
self.parent_context, self.parent_context,
self._tree_name, self._tree_name,