diff --git a/python/hugr_qir/tests/test_guppy_examples.py b/python/hugr_qir/tests/test_guppy_examples.py index 97b75ce..61e741a 100644 --- a/python/hugr_qir/tests/test_guppy_examples.py +++ b/python/hugr_qir/tests/test_guppy_examples.py @@ -7,8 +7,8 @@ GUPPY_EXAMPLES_DIR = Path(__file__).parent / "../../../guppy_examples/" -def guppy_to_hugr_json_file(guppy_file, outfd) -> None: - subprocess.run( +def guppy_to_hugr_json_file(guppy_file: str, outfd: bytes) -> None: + subprocess.run( # noqa: S603 [sys.executable, GUPPY_EXAMPLES_DIR / guppy_file], check=True, stdout=outfd, @@ -16,14 +16,14 @@ def guppy_to_hugr_json_file(guppy_file, outfd) -> None: ) -def cli_on_guppy(guppy_file, tmp_path, *args) -> None: +def cli_on_guppy(guppy_file: str, tmp_path: Path, *args: dict) -> None: guppy_file = Path(guppy_file) json_file = tmp_path / Path(f"{guppy_file.name}.json") - with open(json_file, "w") as f: + with Path.open(json_file, "w") as f: guppy_to_hugr_json_file(guppy_file, f) cli(str(json_file), *[str(arg) for arg in args]) -def test_guppy_planqc_q(tmp_path) -> None: +def test_guppy_planqc_q(tmp_path: Path) -> None: out_file = tmp_path / "out.ll" cli_on_guppy("planqc_1.py", tmp_path, "-o", out_file) diff --git a/ruff.toml b/ruff.toml index fd930fb..9220dc2 100644 --- a/ruff.toml +++ b/ruff.toml @@ -27,7 +27,7 @@ lint.select = [ "G", # flake8-logging-format "I", # isort "ICN", # flake8-import-conventions - "INP", # flake8-no-pep420 + # "INP", # flake8-no-pep420 "INT", # flake8-gettext "ISC", # flake8-implicit-str-concat "LOG", # flake8-logging @@ -63,3 +63,4 @@ convention = "google" [lint.per-file-ignores] "guppy_examples/*" = ["INP"] +