[3/3] pre-commit: add initial config

Message ID 20200601205107.2374989-3-lains@archlinux.org
State New
Headers show
Series [1/3] flake8: add initial config | expand

Commit Message

Filipe Laíns June 1, 2020, 8:51 p.m. UTC
Signed-off-by: Filipe Laíns <lains@archlinux.org>
---
 .pre-commit-config.yaml | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 .pre-commit-config.yaml

Patch

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 00000000..b84a29e3
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,23 @@ 
+hooks:
+  - &base
+    language: python
+    types: [python]
+    require_serial: true
+  - &flake8
+    id: flake8
+    name: flake8
+    entry: flake8
+    <<: *base
+  - &isort
+    id: isort
+    name: isort
+    entry: isort
+    <<: *base
+
+repos:
+  - repo: local
+    hooks:
+      - <<: *flake8
+      - <<: *isort
+        args: ['--check-only', '--diff']
+