]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci: add pre-commit configuration
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 27 Dec 2024 01:48:20 +0000 (02:48 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Fri, 27 Dec 2024 03:01:59 +0000 (04:01 +0100)
.pre-commit-config.yaml [new file with mode: 0644]
psycopg/pyproject.toml

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644 (file)
index 0000000..06cacf8
--- /dev/null
@@ -0,0 +1,26 @@
+# See https://pre-commit.com for more information
+repos:
+  - repo: local
+    hooks:
+      - id: black
+        name: black
+        language: system
+        entry: black --check --diff
+        files: \.py[i]?$
+
+      - id: codespell
+        name: codespell
+        language: system
+        entry: codespell
+
+      - id: flake8
+        name: flake8
+        language: system
+        entry: flake8
+        files: \.py$
+
+      - id: mypy
+        name: mypy
+        language: system
+        entry: mypy --pretty
+        files: \.py[i]?$
index 594a3af8c7272442acfe5c68b601cb46483d0226..a5df9b80bcbab2660e8984d44ac57f469198e7fa 100644 (file)
@@ -84,6 +84,7 @@ dev = [
     "dnspython >= 2.1",
     "flake8 >= 4.0",
     "mypy >= 1.14",
+    "pre-commit >= 4.0.1",
     "types-setuptools >= 57.4",
     "wheel >= 0.37",
 ]