Skip to content

Commit 7322af4

Browse files
style: fix ruff fmt + lint in test_rust.py (ruff 0.15) (#156)
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.
1 parent 1a9c82b commit 7322af4

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

crates/hm-dsl-engine/harmont-py/tests/test_rust.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
from __future__ import annotations
44

5-
import pytest
65
import tempfile
6+
from pathlib import Path
7+
8+
import pytest
79

810
import harmont as hm
911
from harmont.cache import CacheOnChange
1012
from harmont.keygen import resolve_pipeline_keys
11-
from pathlib import Path
12-
1313

1414

1515
def _cmds(p: dict) -> list[str]:
@@ -332,35 +332,37 @@ def test_project_has_all_methods(self):
332332
assert proj.clippy().cmd is not None
333333
assert proj.fmt().cmd is not None
334334

335-
336335
def test_empty_path_throws_error_is_caught(self):
337336
proj = hm.rust.project(path="")
338337
graph = {
339-
"nodes": [
340-
{
341-
"step": {
342-
"key": "a",
343-
"cmd": "cargo build",
344-
"cache": {"policy": "on_change", "paths": [p for p in list(proj.warmup.cache.paths)]},
338+
"nodes": [
339+
{
340+
"step": {
341+
"key": "a",
342+
"cmd": "cargo build",
343+
"cache": {
344+
"policy": "on_change",
345+
"paths": list(proj.warmup.cache.paths),
345346
},
346-
"env": {},
347347
},
348-
],
348+
"env": {},
349+
},
350+
],
349351
"node_holes": [],
350352
"edge_property": "directed",
351353
"edges": [],
352354
}
353-
355+
354356
with tempfile.TemporaryDirectory() as d:
355357
res = resolve_pipeline_keys(
356358
graph,
357359
pipeline_org="default",
358360
pipeline_slug="default",
359361
now=0,
360362
base_path=Path(d),
361-
env={}
363+
env={},
362364
)
363-
assert res['nodes'][0]['step']['cache']['key'] is not None
365+
assert res["nodes"][0]["step"]["cache"]["key"] is not None
364366

365367
def test_warmup_implicit_cache_on_change(self):
366368
proj = hm.rust.project(path="cli")

0 commit comments

Comments
 (0)