Skip to content

Commit f193fb0

Browse files
committed
fix(ci): simplify verify hint to match PR template style
Show single line: just check # or: make check, uvx tox -e <check>
1 parent f264589 commit f193fb0

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

scripts/fast_checks.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,8 @@ def write_github_summary(check: Check, check_key: str, output: str) -> None:
5555
f.write(check.fix_hint)
5656
f.write("\n\n")
5757
f.write("### How to verify\n\n")
58-
f.write("Run the tool directly:\n\n")
5958
f.write("```bash\n")
60-
f.write(check.verify_cmd)
61-
f.write("\n```\n\n")
62-
f.write("Or via tox:\n\n")
63-
f.write("```bash\n")
64-
f.write(f"tox -e {check_key}\n")
59+
f.write(f"just check # or: make check, uvx tox -e {check_key}\n")
6560
f.write("```\n")
6661

6762

@@ -71,15 +66,16 @@ def strip_markdown_code_blocks(text: str) -> str:
7166
return re.sub(r"```\w*\n?", "", text)
7267

7368

74-
def print_fix_hint(check: Check) -> None:
69+
def print_fix_hint(check: Check, check_key: str) -> None:
7570
"""Print fix hint to stderr."""
7671
sep = "=" * 60
7772
hint = strip_markdown_code_blocks(check.fix_hint).strip()
7873
print(f"\n{sep}", file=sys.stderr)
7974
print(f"{check.name} failed:", file=sys.stderr)
8075
print(sep, file=sys.stderr)
8176
print(hint, file=sys.stderr)
82-
print(f"\nVerify fix:\n{check.verify_cmd}", file=sys.stderr)
77+
print(f"\nVerify fix:", file=sys.stderr)
78+
print(f"just check # or: make check, uvx tox -e {check_key}", file=sys.stderr)
8379
print(sep, file=sys.stderr)
8480

8581

@@ -328,7 +324,7 @@ def main() -> None:
328324
exit_code = check.run()
329325

330326
if exit_code != 0:
331-
print_fix_hint(check)
327+
print_fix_hint(check, args.check)
332328
# Only show aggregate hint when not running under tox
333329
if "TOX_ENV_NAME" not in os.environ:
334330
print("\nRun all static checks: tox -e check\n", file=sys.stderr)

0 commit comments

Comments
 (0)