Skip to content

Commit

Permalink
More type hint workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Dec 19, 2024
1 parent 5c1bc35 commit 1d7d47f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/peakrdl_regblock/struct_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import textwrap
from collections import OrderedDict

from systemrdl.walker import RDLListener, RDLWalker, WalkerAction
from systemrdl.walker import RDLListener, RDLWalker

from .identifier_filter import kw_filter as kwf

Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ pylint
mypy
pytest-cov
coveralls>=3.0.0
types-setuptools
14 changes: 8 additions & 6 deletions tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ set -e
cd "$(dirname "$0")"

# Initialize venv
rm -rf .venv
python3 -m venv .venv
source .venv/bin/activate

# Install test dependencies
pip install -r requirements.txt

# Run static type checking prior to installing to avoid sloppy type hints of
# systemrdl package
mypy ../src/peakrdl_regblock

# Install dut
pip install -U ..

# Run lint
pylint --rcfile pylint.rc ../src/peakrdl_regblock

# Run unit tests
pytest --workers auto --cov=peakrdl_regblock --synth-tool skip

# Generate coverage report
coverage html -i -d htmlcov

# Run lint
pylint --rcfile pylint.rc ../src/peakrdl_regblock

# Run static type checking
mypy ../src/peakrdl_regblock

0 comments on commit 1d7d47f

Please sign in to comment.