From: Daniele Varrazzo Date: Fri, 27 Dec 2024 01:48:20 +0000 (+0100) Subject: ci: add pre-commit configuration X-Git-Tag: 3.2.4~7^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cda958d4ec7b2b10f9217de304705dfd47aeb96;p=thirdparty%2Fpsycopg.git ci: add pre-commit configuration --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..06cacf82d --- /dev/null +++ b/.pre-commit-config.yaml @@ -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]?$ diff --git a/psycopg/setup.cfg b/psycopg/setup.cfg index 4cf1eb42a..c49732875 100644 --- a/psycopg/setup.cfg +++ b/psycopg/setup.cfg @@ -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 =