Add pre-commit scripts for file formatting

This commit is contained in:
Aaron Franke
2024-10-27 18:34:06 -07:00
parent 156aa63183
commit eff4d44f06
6 changed files with 153 additions and 1 deletions

33
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,33 @@
default_language_version:
python: python3
exclude: |
(?x)^(
CODE_OF_CONDUCT.md
)
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.6
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
exclude: |
(?x)^(
.*\.po$
)
additional_dependencies: [tomli]
- repo: local
hooks:
- id: file-format
name: file-format
language: python
entry: python .github/workflows/file_format.py
types_or: [text]