mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
@@ -248,7 +248,7 @@ class ValueNameMixin:
|
|||||||
|
|
||||||
def get_defining_qualified_value(self):
|
def get_defining_qualified_value(self):
|
||||||
context = self.parent_context
|
context = self.parent_context
|
||||||
if context.is_module() or context.is_class():
|
if context is not None and (context.is_module() or context.is_class()):
|
||||||
return self.parent_context.get_value() # Might be None
|
return self.parent_context.get_value() # Might be None
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ def test_implicit_namespace_package(Script):
|
|||||||
solution = "foo = '%s'" % solution
|
solution = "foo = '%s'" % solution
|
||||||
assert completion.description == solution
|
assert completion.description == solution
|
||||||
|
|
||||||
|
c, = script_with_path('import pkg').complete()
|
||||||
|
assert c.docstring() == ""
|
||||||
|
|
||||||
|
|
||||||
def test_implicit_nested_namespace_package(Script):
|
def test_implicit_nested_namespace_package(Script):
|
||||||
code = 'from implicit_nested_namespaces.namespace.pkg.module import CONST'
|
code = 'from implicit_nested_namespaces.namespace.pkg.module import CONST'
|
||||||
|
|||||||
Reference in New Issue
Block a user