Skip to content

ci: add pre-commit config for codespell#147

Merged
Vizonex merged 3 commits into
Vizonex:mainfrom
pixelatedkisses:add-pre-commit-config
Jul 2, 2026
Merged

ci: add pre-commit config for codespell#147
Vizonex merged 3 commits into
Vizonex:mainfrom
pixelatedkisses:add-pre-commit-config

Conversation

@pixelatedkisses

@pixelatedkisses pixelatedkisses commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What do these changes do?

This PR introduces a .pre-commit-config.yaml file at the root of the repository to automate formatting, and spell checking. It sets up:

  1. Standard hooks: trailing-whitespace and end-of-file-fixer to keep repository formatting consistently clean.
  2. codespell hook: To automatically catch typos in code and documentation before commits are finalized.
  3. An extensive inline --ignore-words-list and folder exclusion pattern.

Are there changes in behavior for the user?

This change is strictly restricted to the developer workflow and CI environment

Is it a substantial burden for the maintainers to support this?

No. It eliminates the need for maintainers to manually review and flag basic formatting errors during future PR reviews.

Related issue number

Relates to #144

Checklist

  • I think the code is well written
  • Unit tests are not needed
  • Documentation reflects the changes

@Vizonex Vizonex left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@pixelatedkisses Looks like a pretty good start let's make sure we add a workflow first so that this thing can edit these mistakes out and I would also recommend looking into cython-lint to lint the code.

@pixelatedkisses pixelatedkisses requested a review from Vizonex July 1, 2026 13:16
@pixelatedkisses

Copy link
Copy Markdown
Contributor Author

@Vizonex Added the pre-commit CI workflow and the cython-lint hook as suggested.

@pixelatedkisses pixelatedkisses force-pushed the add-pre-commit-config branch from e8cf59f to 5348b80 Compare July 1, 2026 13:21
@Vizonex

Vizonex commented Jul 2, 2026

Copy link
Copy Markdown
Owner

@pixelatedkisses Nice work let's see what pre-commit has to say :)

@Vizonex

Vizonex commented Jul 2, 2026

Copy link
Copy Markdown
Owner

@pixelatedkisses
Recommendation would be to do the following

pip install pre-commit
pre-commit install
git add winloop; git commit -m "fix cython code"

And then let pre-commit do it's thing , although annoying to some (including me some times) this will help you get everything fixed immediately without wasting resources.

@pixelatedkisses

Copy link
Copy Markdown
Contributor Author

@Vizonex, I pushed the latest fixes to the PR branch and pre-commit run --all-files is passing locally now.

@Vizonex Vizonex merged commit 02fe1d1 into Vizonex:main Jul 2, 2026
30 checks passed
@Vizonex

Vizonex commented Jul 2, 2026

Copy link
Copy Markdown
Owner

@pixelatedkisses Thank you :)

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