Skip to content

Commit

Permalink
Fix bug with the parent node checks
Browse files Browse the repository at this point in the history
  • Loading branch information
krcb197 committed Dec 20, 2024
1 parent 3157a08 commit d655771
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/peakrdl_python/systemrdl_node_utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
A set of utility functions that perform supplementary processing on a node in a compiled
system RDL dataset.
"""
from typing import Optional, Protocol
from typing import Optional, Protocol, Union
from collections.abc import Iterable
from itertools import filterfalse

import textwrap

from systemrdl.node import Node
from systemrdl.node import RegNode
from systemrdl.node import RootNode
from systemrdl.node import AddressableNode
from systemrdl.node import FieldNode
from systemrdl.node import MemNode
Expand Down Expand Up @@ -77,7 +78,7 @@ def hide_based_on_property(node: Node, show_hidden: bool) -> bool:
return node.get_property('python_hide', default=False) and not show_hidden


def get_dependent_component(node: AddressableNode,
def get_dependent_component(node: Union[AddressableNode, RootNode],
hide_node_callback: HideNodeCallback) -> Iterable[Node]:
"""
iterable of nodes that have a component which is used by a
Expand Down

0 comments on commit d655771

Please sign in to comment.