diff --git a/src/peakrdl_ipxact/__about__.py b/src/peakrdl_ipxact/__about__.py index 567bfde..922fee7 100644 --- a/src/peakrdl_ipxact/__about__.py +++ b/src/peakrdl_ipxact/__about__.py @@ -1 +1 @@ -__version__ = "3.4.3" +__version__ = "3.4.4" diff --git a/src/peakrdl_ipxact/__peakrdl__.py b/src/peakrdl_ipxact/__peakrdl__.py index 897e5c9..d338c41 100644 --- a/src/peakrdl_ipxact/__peakrdl__.py +++ b/src/peakrdl_ipxact/__peakrdl__.py @@ -73,7 +73,7 @@ def is_compatible(self, path: str) -> bool: with open(path, "r", encoding="utf-8") as f: if re.search(r"<(spirit|ipxact):component\b", f.read()): return True - return False + return False # type: ignore [unreachable] def add_importer_arguments(self, arg_group: 'argparse.ArgumentParser') -> None: arg_group.add_argument( diff --git a/src/peakrdl_ipxact/exporter.py b/src/peakrdl_ipxact/exporter.py index 849e478..1cd42e2 100644 --- a/src/peakrdl_ipxact/exporter.py +++ b/src/peakrdl_ipxact/exporter.py @@ -398,7 +398,7 @@ def add_register(self, parent: minidom.Element, node: RegNode) -> None: mask = 0 for field in node.fields(skip_not_present=False): field_reset = field.get_property("reset") - if field_reset is not None: + if isinstance(field_reset, int): field_mask = ((1 << field.width) - 1) << field.lsb field_reset = (field_reset << field.lsb) & field_mask reset |= field_reset @@ -439,7 +439,7 @@ def add_field(self, parent: minidom.Element, node: FieldNode) -> None: if self.standard >= Standard.IEEE_1685_2014: reset = node.get_property("reset") - if reset is not None: + if isinstance(reset, int): resets_el = self.doc.createElement(self.ns + "resets") field.appendChild(resets_el) reset_el = self.doc.createElement(self.ns + "reset") diff --git a/src/peakrdl_ipxact/importer.py b/src/peakrdl_ipxact/importer.py index 1d01c47..514369f 100644 --- a/src/peakrdl_ipxact/importer.py +++ b/src/peakrdl_ipxact/importer.py @@ -700,7 +700,7 @@ def parse_integer(self, s: str) -> int: v *= multiplier[m.group(2).upper()] return v - m = re.fullmatch(r"\d*'h([0-9a-f]+)", s, re.I) + m = re.fullmatch(r"\d*'h([0-9a-f]+)", s, re.I) # type: ignore [unreachable] if m: return int(m.group(1), 16)