diff --git a/.copier-answers.yaml b/.copier-answers.yaml index e25be07..7bd923b 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: 5ff720b +_commit: '4372075' _src_path: https://github.com/python-project-templates/base.git add_docs: false add_extension: python diff --git a/Makefile b/Makefile index 3875db8..c59c50e 100644 --- a/Makefile +++ b/Makefile @@ -60,16 +60,16 @@ lint-py: ## lint python with ruff python -m ruff format --check verilator lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md - python -m codespell_lib README.md + python -m mdformat --check README.md $(wildcard docs/src) + python -m codespell_lib README.md $(wildcard docs/src) fix-py: ## autoformat python code with ruff python -m ruff check --fix verilator python -m ruff format verilator fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md - python -m codespell_lib --write README.md + python -m mdformat README.md $(wildcard docs/src) + python -m codespell_lib --write README.md $(wildcard docs/src) lint: lint-py lint-docs ## run all linters lints: lint @@ -85,9 +85,9 @@ check-dist: ## check python sdist and wheel with check-dist check-dist -v check-types: ## check python types with ty - ty check --python $$(which python) + python -m ty check -checks: check-dist +checks: check-dist check-types # Alias check: checks diff --git a/pyproject.toml b/pyproject.toml index 397fcf4..196a932 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,12 +44,14 @@ develop = [ "codespell", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov", "ruff", "twine", "ty", + "typer", "uv", "wheel", ] @@ -102,7 +104,7 @@ skip = "*win32 *arm_64" [tool.coverage.run] branch = true omit = [ - "verilator/tests/integration/", + "verilator/tests/integration/*", ] [tool.coverage.report] diff --git a/verilator/cli.py b/verilator/cli.py index e956445..56e6c4f 100644 --- a/verilator/cli.py +++ b/verilator/cli.py @@ -5,7 +5,6 @@ from subprocess import Popen from sys import argv, exit, stderr, stdout from time import sleep -from typing import List @lru_cache(maxsize=1) @@ -61,16 +60,16 @@ def verilator(argv): def build( - input: List[str], + input: list[str], output: str = "obj_dir", - includes: List[str] = None, + includes: list[str] | None = None, timing: bool = True, trace: bool = True, assert_: bool = True, cc: bool = True, build: bool = True, - exe: str = None, - top_module: str = None, + exe: str | None = None, + top_module: str | None = None, ): """Utility to build a verilated module""" includes = includes or []