1
0
forked from VimPlug/jedi

Make MixedName a Namewrapper instead of inheritance

This commit is contained in:
Dave Halter
2020-01-25 17:50:43 +01:00
parent 8bde54a072
commit 329329c195
2 changed files with 24 additions and 29 deletions

View File

@@ -354,9 +354,10 @@ class CompiledName(AbstractNameDefinition):
@memoize_method
def infer(self):
return ValueSet([create_from_name(
self._inference_state, self._parent_value, self.string_name
)])
return ValueSet([self.infer_compiled_object()])
def infer_compiled_object(self):
return create_from_name(self._inference_state, self._parent_value, self.string_name)
class SignatureParamName(ParamNameInterface, AbstractNameDefinition):
@@ -432,8 +433,6 @@ class EmptyCompiledName(AbstractNameDefinition):
class CompiledObjectFilter(AbstractFilter):
name_class = CompiledName
def __init__(self, inference_state, compiled_object, is_instance=False):
self._inference_state = inference_state
self.compiled_object = compiled_object
@@ -503,7 +502,7 @@ class CompiledObjectFilter(AbstractFilter):
return names
def _create_name(self, name):
return self.name_class(
return CompiledName(
self._inference_state,
self.compiled_object,
name