Skip to content

Commit

Permalink
Fix FieldNode.is_volatile incorrectly returning non-boolean value if …
Browse files Browse the repository at this point in the history
…some properties are assigned references
  • Loading branch information
amykyta3 committed Jan 12, 2024
1 parent cce91f4 commit f9fc640
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ jobs:

- name: Install dependencies
run: |
python -m pip install -U mypy types-Markdown
python -m pip install -U types-Markdown
# Exclude version due to: https://github.com/python/mypy/issues/16770
python -m pip install -U "mypy != 1.8.0"
- name: Type Check
run: |
Expand Down
2 changes: 1 addition & 1 deletion systemrdl/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.27.2"
__version__ = "1.27.3"
4 changes: 2 additions & 2 deletions systemrdl/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1089,8 +1089,8 @@ def is_volatile(self) -> bool:
(hw in (rdltypes.AccessType.rw, rdltypes.AccessType.rw1,
rdltypes.AccessType.w, rdltypes.AccessType.w1))
or self.get_property('counter')
or self.get_property('hwset')
or self.get_property('hwclr')
or bool(self.get_property('hwset'))
or bool(self.get_property('hwclr'))
)

@property
Expand Down
4 changes: 3 additions & 1 deletion test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ source $this_dir/.venv/bin/activate

# Install test dependencies
pip install -U pip setuptools wheel
pip install pytest pytest-cov coverage pylint mypy parameterized types-Markdown pytest-parallel
pip install pytest pytest-cov coverage pylint parameterized types-Markdown pytest-parallel
# Exclude version due to: https://github.com/python/mypy/issues/16770
pip install "mypy != 1.8.0"

# Install dut
export SYSTEMRDL_REQUIRE_BINARY_BUILD=1
Expand Down

0 comments on commit f9fc640

Please sign in to comment.