Skip to content

Commit 4e22fba

Browse files
style: pre-commit.ci auto fixes [...]
1 parent 929b6ea commit 4e22fba

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/taskgraph/transforms/run/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ def should_use_cache(
150150
return name not in exclude_caches
151151

152152

153-
def support_caches(config: TransformConfig, task: dict[str, Any], taskdesc: dict[str, Any]):
153+
def support_caches(
154+
config: TransformConfig, task: dict[str, Any], taskdesc: dict[str, Any]
155+
):
154156
"""Add caches for common tools."""
155157
run = task["run"]
156158
base_cache_dir = f"{run['workdir']}/.cache"

test/test_transforms_run_run_task.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,7 @@ def test_caches_exclude(run_caches):
331331
def test_caches_project_include(run_caches):
332332
caches = run_caches(
333333
{},
334-
extra_graph_config={
335-
"taskgraph": {"run": {"include-caches": ["cargo"]}}
336-
},
334+
extra_graph_config={"taskgraph": {"run": {"include-caches": ["cargo"]}}},
337335
)
338336
assert caches == [
339337
{"cache-name": "cargo", "directory": "/builds/worker/.cache/cargo"}
@@ -343,9 +341,7 @@ def test_caches_project_include(run_caches):
343341
def test_caches_project_exclude(run_caches):
344342
caches = run_caches(
345343
{},
346-
extra_graph_config={
347-
"taskgraph": {"run": {"exclude-caches": ["cargo"]}}
348-
},
344+
extra_graph_config={"taskgraph": {"run": {"exclude-caches": ["cargo"]}}},
349345
)
350346
assert len(caches) == len(CACHES) - 1
351347
assert all(c["cache-name"] != "cargo" for c in caches)

0 commit comments

Comments
 (0)