aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-03-07 14:35:19 +0000
committerGravatar Chris Lovering <[email protected]>2023-05-04 13:27:53 +0100
commit6807f5aa776d49819ecf61497552e90f7cfa73ca (patch)
treeb955b5521a7dd9411875521de4ec56f13ef72db6
parentbuild(deps-dev): bump ruff from 0.0.263 to 0.0.264 (#56) (diff)
Add pre-commit config
-rw-r--r--.pre-commit-config.yaml29
1 files changed, 29 insertions, 0 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..2e567e7
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,29 @@
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v2.5.0
+ hooks:
+ - id: check-merge-conflict
+ - id: check-toml
+ - id: check-yaml
+ - id: end-of-file-fixer
+ - id: trailing-whitespace
+ args: [--markdown-linebreak-ext=md]
+
+ - repo: local
+ hooks:
+ - id: ruff
+ name: ruff
+ description: Run ruff linting
+ entry: poetry run ruff check --force-exclude
+ language: system
+ 'types_or': [python, pyi]
+ require_serial: true
+ args: [--fix, --exit-non-zero-on-fix]
+
+ - id: black
+ name: Black
+ description: Run black
+ entry: poetry run black
+ language: system
+ 'types_or': [python, pyi]
+ require_serial: true