aboutsummaryrefslogtreecommitdiff
path: root/R2R/.pre-commit-config.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'R2R/.pre-commit-config.yaml')
-rwxr-xr-xR2R/.pre-commit-config.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/R2R/.pre-commit-config.yaml b/R2R/.pre-commit-config.yaml
new file mode 100755
index 00000000..58fb9158
--- /dev/null
+++ b/R2R/.pre-commit-config.yaml
@@ -0,0 +1,32 @@
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.3.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: check-added-large-files
+ - id: check-ast
+ - id: check-yaml
+
+ - repo: local
+ hooks:
+ - id: isort
+ name: isort
+ entry: poetry run isort
+ language: system
+ types: [python]
+ args: ["--check", "--diff"]
+
+ - id: black
+ name: black
+ entry: poetry run black
+ language: system
+ types: [python]
+ args: ["--check", "--diff"]
+
+ - id: flake8
+ name: flake8
+ entry: poetry run flake8
+ language: system
+ types: [python]
+ args: ["--config=.flake8"]