Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit #204

Merged
merged 3 commits into from Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/psf/black
# Version can be updated by running "pre-commit autoupdate"
rev: 24.3.0
hooks:
- id: black
ci:
# Don't run automatically on PRs, instead add the comment
# "pre-commit.ci autofix" on a pull request to manually trigger auto-fixing
autofix_prs: false
1 change: 1 addition & 0 deletions CHANGELOG.rst
Expand Up @@ -13,6 +13,7 @@ Unreleased
Added
-----
- Explicit support for Python 3.11.
- Added Pre-Commit for code formatting.

Changed
-------
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.rst
Expand Up @@ -86,6 +86,10 @@ Please run the latest version of
`black <https://black.readthedocs.io/en/stable/the_black_code_style/index.html>`_ on
your newly added and modified files prior to each PR.

If this doesn't work for you, you can also use the Pre-commit CI to reformat your code
on github by commenting "pre-commit autofix" on your PR.


Run and write tests
-------------------

Expand Down