Skip to content

Commit f9fc640

Browse files
committed
Fix FieldNode.is_volatile incorrectly returning non-boolean value if some properties are assigned references
1 parent cce91f4 commit f9fc640

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ jobs:
123123

124124
- name: Install dependencies
125125
run: |
126-
python -m pip install -U mypy types-Markdown
126+
python -m pip install -U types-Markdown
127+
128+
# Exclude version due to: https://github.com/python/mypy/issues/16770
129+
python -m pip install -U "mypy != 1.8.0"
127130
128131
- name: Type Check
129132
run: |

systemrdl/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.27.2"
1+
__version__ = "1.27.3"

systemrdl/node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,8 @@ def is_volatile(self) -> bool:
10891089
(hw in (rdltypes.AccessType.rw, rdltypes.AccessType.rw1,
10901090
rdltypes.AccessType.w, rdltypes.AccessType.w1))
10911091
or self.get_property('counter')
1092-
or self.get_property('hwset')
1093-
or self.get_property('hwclr')
1092+
or bool(self.get_property('hwset'))
1093+
or bool(self.get_property('hwclr'))
10941094
)
10951095

10961096
@property

test/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ source $this_dir/.venv/bin/activate
2121

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

2628
# Install dut
2729
export SYSTEMRDL_REQUIRE_BINARY_BUILD=1

0 commit comments

Comments
 (0)