Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Nov 9, 2022
1 parent ada050b commit fcfd5c0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/peakrdl_regblock/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def export(self, node: Union[RootNode, AddrmapNode], output_dir:str, **kwargs: A

if generate_hwif_report:
path = os.path.join(output_dir, f"{module_name}_hwif.rpt")
hwif_report_file = open(path, "w")
hwif_report_file = open(path, "w", encoding='utf-8') # pylint: disable=consider-using-with
else:
hwif_report_file = None

Expand Down
6 changes: 3 additions & 3 deletions src/peakrdl_regblock/hwif/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import TYPE_CHECKING, Union, List, Set, Dict
from typing import TYPE_CHECKING, Union, Set, Dict, Optional, TextIO

from systemrdl.node import AddrmapNode, Node, SignalNode, FieldNode, AddressableNode, RegNode
from systemrdl.node import AddrmapNode, SignalNode, FieldNode, RegNode
from systemrdl.rdltypes import PropertyReference

from ..utils import get_indexed_path
Expand All @@ -23,7 +23,7 @@ class Hwif:
def __init__(
self, exp: 'RegblockExporter', package_name: str,
in_hier_signal_paths: Set[str], out_of_hier_signals: Dict[str, SignalNode],
reuse_typedefs: bool, hwif_report_file: int
reuse_typedefs: bool, hwif_report_file: Optional[TextIO]
):
self.exp = exp
self.package_name = package_name
Expand Down
4 changes: 2 additions & 2 deletions src/peakrdl_regblock/hwif/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, hwif: 'Hwif', hwif_name: str) -> None:

self.hwif_report_stack = [hwif_name]

def push_struct(self, type_name: str, inst_name: str, array_dimensions: Optional[List[int]] = None) -> None:
def push_struct(self, type_name: str, inst_name: str, array_dimensions: Optional[List[int]] = None) -> None: # type: ignore
super().push_struct(type_name, inst_name, array_dimensions)

if array_dimensions:
Expand All @@ -31,7 +31,7 @@ def pop_struct(self) -> None:
super().pop_struct()
self.hwif_report_stack.pop()

def add_member(self, name: str, width: int = 1) -> None:
def add_member(self, name: str, width: int = 1) -> None: # type: ignore # pylint: disable=arguments-differ
super().add_member(name, width)

if width > 1:
Expand Down
4 changes: 3 additions & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
pytest
# hold back: https://github.com/kevlened/pytest-parallel/issues/118
pytest<7.2

parameterized
pytest-parallel
jinja2-simple-tags
Expand Down

0 comments on commit fcfd5c0

Please sign in to comment.