forked from VimPlug/jedi
Use get_qualified_names for full_name
This commit is contained in:
@@ -45,9 +45,9 @@ class FunctionAndClassBase(TreeContext):
|
||||
if n is None:
|
||||
# This means that the parent class lives within a function.
|
||||
return None
|
||||
return n + [self.py__name__()]
|
||||
return n + (self.py__name__(),)
|
||||
elif self.parent_context.is_module():
|
||||
return [self.py__name__()]
|
||||
return (self.py__name__(),)
|
||||
else:
|
||||
return None
|
||||
|
||||
@@ -164,7 +164,7 @@ class MethodContext(FunctionContext):
|
||||
names = self.class_context.get_qualified_names()
|
||||
if names is None:
|
||||
return None
|
||||
return names + [self.py__name__()]
|
||||
return names + (self.py__name__(),)
|
||||
|
||||
|
||||
class FunctionExecutionContext(TreeContext):
|
||||
|
||||
@@ -73,6 +73,9 @@ class AbstractInstanceContext(Context):
|
||||
def is_instance(self):
|
||||
return True
|
||||
|
||||
def get_qualified_names(self):
|
||||
return self.class_context.get_qualified_names()
|
||||
|
||||
def get_annotated_class_object(self):
|
||||
return self.class_context # This is the default.
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class ModuleMixin(SubModuleDictMixin):
|
||||
it's reachable and not `None`. With this information we can add
|
||||
qualified names on top for all context children.
|
||||
"""
|
||||
return []
|
||||
return ()
|
||||
|
||||
|
||||
class ModuleContext(ModuleMixin, TreeContext):
|
||||
@@ -182,7 +182,7 @@ class ModuleContext(ModuleMixin, TreeContext):
|
||||
self._path = None
|
||||
else:
|
||||
self._path = file_io.path
|
||||
self.string_names = string_names
|
||||
self.string_names = string_names # Optional[Tuple[str, ...]]
|
||||
self.code_lines = code_lines
|
||||
self.is_package = is_package
|
||||
|
||||
|
||||
Reference in New Issue
Block a user