From 990144afadd93183f24b09c5a85855c4e0027411 Mon Sep 17 00:00:00 2001 From: Marko Vejnovic Date: Thu, 25 Jun 2026 01:49:59 +0000 Subject: [PATCH] style: fix ruff fmt + lint in test_rust.py (ruff 0.15) main's test_rust.py (added after the stale submodule pin) failed the :python: fmt and :python: lint CI steps under ruff 0.15.14: reformat + Q000 single-quote fixes + C416 (drop redundant list comprehension). No behavior change. --- .../harmont-py/tests/test_rust.py | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/crates/hm-dsl-engine/harmont-py/tests/test_rust.py b/crates/hm-dsl-engine/harmont-py/tests/test_rust.py index 4b1c541b..819d32e3 100644 --- a/crates/hm-dsl-engine/harmont-py/tests/test_rust.py +++ b/crates/hm-dsl-engine/harmont-py/tests/test_rust.py @@ -2,14 +2,14 @@ from __future__ import annotations -import pytest import tempfile +from pathlib import Path + +import pytest import harmont as hm from harmont.cache import CacheOnChange from harmont.keygen import resolve_pipeline_keys -from pathlib import Path - def _cmds(p: dict) -> list[str]: @@ -332,25 +332,27 @@ def test_project_has_all_methods(self): assert proj.clippy().cmd is not None assert proj.fmt().cmd is not None - def test_empty_path_throws_error_is_caught(self): proj = hm.rust.project(path="") graph = { - "nodes": [ - { - "step": { - "key": "a", - "cmd": "cargo build", - "cache": {"policy": "on_change", "paths": [p for p in list(proj.warmup.cache.paths)]}, + "nodes": [ + { + "step": { + "key": "a", + "cmd": "cargo build", + "cache": { + "policy": "on_change", + "paths": list(proj.warmup.cache.paths), }, - "env": {}, }, - ], + "env": {}, + }, + ], "node_holes": [], "edge_property": "directed", "edges": [], } - + with tempfile.TemporaryDirectory() as d: res = resolve_pipeline_keys( graph, @@ -358,9 +360,9 @@ def test_empty_path_throws_error_is_caught(self): pipeline_slug="default", now=0, base_path=Path(d), - env={} + env={}, ) - assert res['nodes'][0]['step']['cache']['key'] is not None + assert res["nodes"][0]["step"]["cache"]["key"] is not None def test_warmup_implicit_cache_on_change(self): proj = hm.rust.project(path="cli")