1
0
forked from VimPlug/jedi

Fix inferring dict.values()

This commit is contained in:
Dave Halter
2018-09-21 01:09:13 +02:00
parent 43ffcb0802
commit 389d4e3d9c
5 changed files with 19 additions and 5 deletions

View File

@@ -112,7 +112,7 @@ class FunctionContext(use_metaclass(CachedMetaClass, AbstractFunction)):
def py__call__(self, arguments, need_param_match=False):
function_execution = self.get_function_execution(arguments)
if need_param_match and function_execution.matches_signature():
if need_param_match and not function_execution.matches_signature():
return NO_CONTEXTS
return function_execution.infer()

View File

@@ -274,7 +274,6 @@ class TreeInstance(AbstractInstanceContext):
# First check if the signature even matches, if not we don't
# need to infer anything.
continue
print(bound)
context_set = define_type_vars_for_execution(
ContextSet(self.class_context),
execution,

View File

@@ -406,7 +406,7 @@ class TypeVar(_BaseTypingContext):
return ContextSet.from_sets(
l.infer() for l in self._constraints_lazy_contexts
)
debug.warning('Tried to infer a TypeVar without a given type')
debug.warning('Tried to infer the TypeVar %r without a given type', self._var_name)
return NO_CONTEXTS
@property