don't use SubModule's in the scope list if it has a parent
This commit is contained in:
1 parent
9181410c47
commit
d82f315ea6
2 files changed
+5
No files matched your search
@@ -159,6 +159,10 @@ def get_names_of_scope(scope, position=None, star_search=True,
|
||||
in_func_scope = scope
|
||||
non_flow = scope.get_parent_until(pr.Flow, reverse=True)
|
||||
while scope:
|
||||
if isinstance(scope, pr.SubModule) and scope.parent:
|
||||
# we don't want submodules to report if we have modules.
|
||||
scope = scope.parent
|
||||
continue
|
||||
# `pr.Class` is used, because the parent is never `Class`.
|
||||
# Ignore the Flows, because the classes and functions care for that.
|
||||
# InstanceElement of Class is ignored, if it is not the start scope.
|
||||
|
||||
Reference in new issue
Block a user