Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/contributor-metrics/tests/test_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def convo(dates):


def test_rate_limit_is_retried_with_backoff(fake_gh, monkeypatch):
import contributor_metrics.fetch as f
from contributor_metrics import fetch as f

sleeps = []
monkeypatch.setattr(f.time, "sleep", lambda s: sleeps.append(s))
Expand All @@ -383,7 +383,7 @@ def flaky(cmd, *a, **k):


def test_other_gh_errors_are_not_retried(fake_gh, monkeypatch):
import contributor_metrics.fetch as f
from contributor_metrics import fetch as f

monkeypatch.setattr(f.time, "sleep", lambda s: (_ for _ in ()).throw(AssertionError("should not sleep")))
monkeypatch.setattr(
Expand Down
2 changes: 1 addition & 1 deletion tools/jira/tests/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import pytest

import jira_bridge.rest as rest_mod
from jira_bridge import rest as rest_mod
from jira_bridge.rest import JiraRest, JiraRestConfigError, JiraRestError

BASE = "https://issues.example.org/jira"
Expand Down
5 changes: 3 additions & 2 deletions tools/reproducible-archive/tests/test_reproducible_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ def test_symlink_mode_is_platform_independent(fmt: str) -> None:
macos = [*base, ra.Entry("p/link", "symlink", 0o755, linkname="target")]
linux = [*base, ra.Entry("p/link", "symlink", 0o777, linkname="target")]
write = ra.write_zip if fmt == "zip" else ra.write_tar_gz
assert write(macos, EPOCH) == write(linux, EPOCH)
macos_archive, linux_archive = write(macos, EPOCH), write(linux, EPOCH)
assert macos_archive == linux_archive
assert ra.swhid_dir_of_entries(macos, "p") == ra.swhid_dir_of_entries(linux, "p")
packed = ra.read_zip_entries(write(macos, EPOCH)) if fmt == "zip" else ra.read_tar_entries(write(macos, EPOCH))
packed = ra.read_zip_entries(macos_archive) if fmt == "zip" else ra.read_tar_entries(macos_archive)
assert [e.mode for e in packed if e.kind == "symlink"] == [0o777]


Expand Down
8 changes: 5 additions & 3 deletions tools/vetted-ops/src/vetted_ops/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1870,9 +1870,11 @@ def build(cfg: dict[str, str], login: str) -> list[str]:
# paths drops that flag, so a caller cannot tell a complete listing
# from a partial one and reads the gap as "those paths do not
# exist". Fail loudly instead of answering with half a tree.
'if .truncated then error("repo-tree: the GitHub API truncated '
"this tree; the listing is incomplete. Walk the tree level by "
'level instead of relying on recursive=1.") else .tree[].path end',
(
'if .truncated then error("repo-tree: the GitHub API truncated '
"this tree; the listing is incomplete. Walk the tree level by "
'level instead of relying on recursive=1.") else .tree[].path end'
),
],
)
)
Expand Down