Skip to content

Add pre-commit with formatting.#33

Merged
sandlbn merged 1 commit into
mainfrom
mzweilin/add_precommit
May 27, 2026
Merged

Add pre-commit with formatting.#33
sandlbn merged 1 commit into
mainfrom
mzweilin/add_precommit

Conversation

@mzweilin
Copy link
Copy Markdown
Collaborator

This PR adds a pre-commit to format the code locally for contributors, before it is checked by our CI.

Signed-off-by: Weilin Xu <weilin.xu@intel.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces local pre-commit tooling so contributors can run Ruff checks and formatting before committing, aligning local development workflow with the repository’s existing Ruff-based formatting setup.

Changes:

  • Adds a Ruff-based .pre-commit-config.yaml.
  • Adds pre-commit to the development dependency group.
  • Documents setup and usage steps in CONTRIBUTING.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.pre-commit-config.yaml Defines Ruff lint and format hooks for pre-commit.
pyproject.toml Adds pre-commit as a dev dependency.
CONTRIBUTING.md Documents how contributors can install and run pre-commit locally.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mzweilin mzweilin requested a review from sandlbn May 27, 2026 20:08
@mzweilin
Copy link
Copy Markdown
Collaborator Author

@sandlbn ready to review

Copy link
Copy Markdown
Contributor

@sandlbn sandlbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sandlbn sandlbn merged commit 37efbb5 into main May 27, 2026
3 checks passed
@sandlbn sandlbn deleted the mzweilin/add_precommit branch May 27, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants