Skip to content

Commit

Permalink
project: Add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartMacKay committed Dec 29, 2024
1 parent 05258f5 commit 7964d82
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ __pycache__/
!.github
!.gitignore
!.gitkeep
!.pre-commit-config.yaml
!.readthedocs.yml
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ license-files = []
dev-dependencies = [
"bump-my-version>=0.29.0",
"isort>=5.13.2",
"pre-commit>=4.0.1",
"pytest>=8.3.4",
"ruff>=0.8.4",
"sphinx>=8.1.3",
Expand Down
89 changes: 89 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7964d82

Please sign in to comment.