aboutsummaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.pre-commit-config.yaml')
-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..bdf3a86
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,29 @@
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.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-lint
+ name: ruff linting
+ 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: ruff-format
+ name: ruff formatting
+ description: Run ruff formatting
+ entry: poetry run ruff format --force-exclude
+ language: system
+ "types_or": [python, pyi]
+ require_serial: true