Skip to content

ci: switch formatting CI to check-only and enable pre-commit hooks#15656

Merged
chtruong814 merged 1 commit into
mainfrom
chtruong/formatting
May 1, 2026
Merged

ci: switch formatting CI to check-only and enable pre-commit hooks#15656
chtruong814 merged 1 commit into
mainfrom
chtruong/formatting

Conversation

@chtruong814
Copy link
Copy Markdown
Collaborator

Summary

  • Formatting workflow (code-formatting.yml) now runs black and isort in check-only mode — it fails the CI check instead of auto-fixing and pushing commits back to the PR branch
  • Pre-commit hooks for black and isort are now enabled locally (previously skipped via skip: [black,isort]), so developers catch formatting issues before committing
  • Removed the hardcoded language_version: python3.10 pin from the black pre-commit hook (uses default_language_version: python3 instead)

Test plan

  • Verified pre-commit run black passes on correctly formatted files
  • Verified pre-commit run isort passes on correctly formatted files
  • Verified both hooks catch and fix misformatted staged files (report Failed + auto-fix)

🤖 Generated with Claude Code

The formatting workflow no longer auto-fixes and pushes commits back to
PR branches. Instead it fails if black or isort find issues, shifting
formatting responsibility to developers via pre-commit hooks which are
now enabled (previously skipped).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
thomasdhc
thomasdhc previously approved these changes May 1, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 1, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@chtruong814 chtruong814 force-pushed the chtruong/formatting branch from a6fa62d to ca37c32 Compare May 1, 2026 16:48
@chtruong814 chtruong814 disabled auto-merge May 1, 2026 16:49
@chtruong814 chtruong814 merged commit 7ccc79b into main May 1, 2026
98 of 103 checks passed
@chtruong814 chtruong814 deleted the chtruong/formatting branch May 1, 2026 16:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

[🤖]: Hi @chtruong814 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants