1
0
forked from VimPlug/jedi

Make it possible to infer Callable TypeVars, fixes #1449

This commit is contained in:
Dave Halter
2019-12-12 23:22:52 +01:00
parent 536a77551b
commit e656a5f18f
6 changed files with 101 additions and 5 deletions
+7
View File
@@ -297,6 +297,9 @@ class BaseTypingValue(LazyValueWrapper):
def _get_wrapped_value(self):
return _PseudoTreeNameClass(self.parent_context, self._tree_name)
def __repr__(self):
return '%s(%s)' % (self.__class__.__name__, self._tree_name.value)
class BaseTypingValueWithGenerics(DefineGenericBase):
def __init__(self, parent_context, tree_name, generics_manager):
@@ -307,3 +310,7 @@ class BaseTypingValueWithGenerics(DefineGenericBase):
def _get_wrapped_value(self):
return _PseudoTreeNameClass(self.parent_context, self._tree_name)
def __repr__(self):
return '%s(%s%s)' % (self.__class__.__name__, self._tree_name.value,
self._generics_manager)