forked from VimPlug/jedi
Add testing for mismatch cases
This should help catch any errors in our handling of invalid cases. While some of these produce outputs which aren't correct, what we're checking here is that we don't _error_ while producing that output. Also fix a case which this showed up.
This commit is contained in:
@@ -494,6 +494,11 @@ def _infer_type_vars(annotation_value, value_set, is_class_value=False):
|
||||
# the elements from the set first, then handle them, even if we put
|
||||
# them back in a set afterwards.
|
||||
for element in value_set:
|
||||
if element.api_type == u'function':
|
||||
# Functions & methods don't have an MRO and we're not
|
||||
# expecting a Callable (those are handled separately above).
|
||||
continue
|
||||
|
||||
if element.is_instance():
|
||||
py_class = element.get_annotated_class_object()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user