Skip to content

pre-commit: initialize (Infra)#2433

Draft
Saviq wants to merge 1 commit into
canonical:mainfrom
Saviq:add-pre-commit
Draft

pre-commit: initialize (Infra)#2433
Saviq wants to merge 1 commit into
canonical:mainfrom
Saviq:add-pre-commit

Conversation

@Saviq
Copy link
Copy Markdown
Collaborator

@Saviq Saviq commented Mar 30, 2026

Description

Rather than rely on people remembering to run linters/formatters, and maintain a separate config in Actions, use https://pre-commit.com hooks to standardize.

pre-commit install locally to validate every commit.

If you configure https://github.com/apps/pre-commit-ci-lite to have access to this repo, it will even autofix PRs.

pre-commit run --all-files is quite unhappy at the moment, but that's out of scope for this PR.

Resolved issues

N/A

Documentation

N/A

Tests

N/A

Comment thread .pre-commit-config.yaml
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
- repo: https://github.com/psf/black
Copy link
Copy Markdown
Contributor

@tomli380576 tomli380576 May 19, 2026

Choose a reason for hiding this comment

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

there's a mirror that's allegedly 2x as fast: https://github.com/psf/black-pre-commit-mirror

  - repo: https://github.com/psf/black-pre-commit-mirror
    rev: # version num here
    hooks:
      - id: black

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.

2 participants