From 1d050cbd101e05d420162217ec5361d89c525952 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 31 May 2026 10:26:46 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../install/test_macos_release_manifest.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/studio/install/test_macos_release_manifest.py b/tests/studio/install/test_macos_release_manifest.py index ec88db94fd..7df8f72b27 100644 --- a/tests/studio/install/test_macos_release_manifest.py +++ b/tests/studio/install/test_macos_release_manifest.py @@ -81,12 +81,16 @@ def _manifest_bytes(): }, ], } - return (json.dumps(manifest, indent=2) + "\n").encode("utf-8") + return (json.dumps(manifest, indent = 2) + "\n").encode("utf-8") -def _checksums_payload(manifest_bytes, *, include_exact_source=True): +def _checksums_payload(manifest_bytes, *, include_exact_source = True): artifacts = { - ARM64_ASSET: {"sha256": _hex(ARM64_ASSET), "repo": REPO, "kind": "macos-arm64-app"}, + ARM64_ASSET: { + "sha256": _hex(ARM64_ASSET), + "repo": REPO, + "kind": "macos-arm64-app", + }, X64_ASSET: {"sha256": _hex(X64_ASSET), "repo": REPO, "kind": "macos-x64-app"}, "llama-prebuilt-manifest.json": { "sha256": hashlib.sha256(manifest_bytes).hexdigest(), @@ -139,7 +143,10 @@ def test_bundle_parses_both_slices(manifest_bytes): bundle = ILP.parse_published_release_bundle(REPO, _release_dict()) assert bundle is not None assert bundle.upstream_tag == UPSTREAM_TAG - assert sorted(a.install_kind for a in bundle.artifacts) == ["macos-arm64", "macos-x64"] + assert sorted(a.install_kind for a in bundle.artifacts) == [ + "macos-arm64", + "macos-x64", + ] assert bundle.source_commit == COMMIT @@ -183,7 +190,9 @@ def test_missing_source_hash_is_rejected(manifest_bytes): # No exact-source and no legacy source entry -> require_approved_source_hash # must reject, so we never silently ship a bundle with no approved source. checksums = ILP.parse_approved_release_checksums( - REPO, RELEASE_TAG, _checksums_payload(manifest_bytes, include_exact_source=False) + REPO, + RELEASE_TAG, + _checksums_payload(manifest_bytes, include_exact_source = False), ) assert ILP.exact_source_archive_hash(checksums) is None with pytest.raises(ILP.PrebuiltFallback):