]> 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>
Thu, 9 Jan 2025 13:43:57 +0000 (14:43 +0100)
.pre-commit-config.yaml [new file with mode: 0644]
psycopg/setup.cfg

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 4cf1eb42a3d7816ced8e65c86af6dc47b7e0a6af..c49732875d99c5ca3d9bc5307c5b578018950e83 100644 (file)
@@ -80,6 +80,7 @@ dev =
     dnspython >= 2.1
     flake8 >= 4.0
     mypy >= 1.14
+    pre-commit >= 4.0.1
     types-setuptools >= 57.4
     wheel >= 0.37
 docs =