forked from VimPlug/jedi
Fix final gradual typing related issues
This commit is contained in:
@@ -139,7 +139,7 @@ def _search_function_executions(inference_state, module_context, funcdef, string
|
||||
if i * inference_state.dynamic_params_depth > MAX_PARAM_SEARCHES:
|
||||
return
|
||||
|
||||
random_context = inference_state.create_context(for_mod_context, name)
|
||||
random_context = for_mod_context.create_context(name)
|
||||
for function_execution in _check_name_for_execution(
|
||||
inference_state, random_context, compare_node, name, trailer):
|
||||
found_executions = True
|
||||
|
||||
@@ -204,7 +204,7 @@ class TypingValue(_BaseTypingValue):
|
||||
)
|
||||
|
||||
|
||||
class _TypingClassMixin(object):
|
||||
class _TypingClassMixin(ClassMixin):
|
||||
def py__bases__(self):
|
||||
return [LazyKnownValues(
|
||||
self.inference_state.builtins_module.py__getattribute__('object')
|
||||
@@ -214,11 +214,11 @@ class _TypingClassMixin(object):
|
||||
return []
|
||||
|
||||
|
||||
class TypingClassValueWithIndex(_TypingClassMixin, ClassMixin, TypingValueWithIndex):
|
||||
class TypingClassValueWithIndex(_TypingClassMixin, TypingValueWithIndex):
|
||||
pass
|
||||
|
||||
|
||||
class TypingClassValue(_TypingClassMixin, TypingValue, ClassMixin):
|
||||
class TypingClassValue(_TypingClassMixin, TypingValue):
|
||||
index_class = TypingClassValueWithIndex
|
||||
|
||||
|
||||
|
||||
@@ -536,7 +536,7 @@ def get_module_contexts_containing_name(inference_state, module_contexts, name):
|
||||
m = _load_module_from_path(inference_state, new_file_io, base_names)
|
||||
if isinstance(m, compiled.CompiledObject):
|
||||
return None
|
||||
return m
|
||||
return m.as_context()
|
||||
|
||||
# skip non python modules
|
||||
used_mod_paths = set()
|
||||
|
||||
Reference in New Issue
Block a user