Type hinting cleanup

This commit is contained in:
Alex Mykyta
2025-03-03 21:36:57 -08:00
parent 0258cac186
commit 40687abd6b
13 changed files with 69 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
import re
from typing import Match, Union
from typing import Match, Union, Optional
from systemrdl.rdltypes.references import PropertyReference
from systemrdl.node import Node, AddrmapNode
@@ -45,6 +45,7 @@ def ref_is_internal(top_node: AddrmapNode, ref: Union[Node, PropertyReference])
For the sake of this exporter, root signals are treated as internal.
"""
current_node: Optional[Node]
if isinstance(ref, Node):
current_node = ref
elif isinstance(ref, PropertyReference):