Don't use globals anymore
This commit is contained in:
1 parent
33224ae7e1
commit
28ecc2709a
1 file changed
+7
-1
@@ -116,7 +116,13 @@ class TypingValueWithIndex(BaseTypingValueWithGenerics):
|
||||
# For now don't do anything here, ClassVars are always used.
|
||||
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(
|
||||
self.parent_context,
|
||||
self._tree_name,
|
||||
|
||||
Reference in new issue
Block a user