Make is_package a function and call it consistently
This commit is contained in:
1 parent
6ffeea7eea
commit
8a26a23884
7 files changed
+19
-10
No files matched your search
@@ -93,7 +93,7 @@ class AbstractTreeName(AbstractNameDefinition):
|
||||
# In case of level == 1, it works always, because it's like a submodule
|
||||
# lookup.
|
||||
if import_node is not None and not (import_node.level == 1
|
||||
and self.get_root_context().is_package):
|
||||
and self.get_root_context().is_package()):
|
||||
# TODO improve the situation for when level is present.
|
||||
if include_module_names and not import_node.level:
|
||||
return tuple(n.value for n in import_node.get_path_for_name(self.tree_name))
|
||||
|
||||
Reference in new issue
Block a user