From: Daniele Varrazzo Date: Tue, 29 Apr 2025 17:09:18 +0000 (+0200) Subject: chore: exclude linters run on tstring test module X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4cd9b1966d81bf3ea914f5a132c8000d99cfe866;p=thirdparty%2Fpsycopg.git chore: exclude linters run on tstring test module Currently the tooling doesn't support the syntax yet. --- diff --git a/.flake8 b/.flake8 index 0cc6c5ff5..42c860068 100644 --- a/.flake8 +++ b/.flake8 @@ -6,7 +6,7 @@ [flake8] max-line-length = 88 ignore = W503, E203, E704 -extend-exclude = .venv build +extend-exclude = .venv build tests/test_tstring.py per-file-ignores = # Autogenerated section psycopg/psycopg/errors.py: E125, E128, E302 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86fc7b378..b0f07a05a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,6 +21,7 @@ repos: language: system entry: black --check --diff --color --quiet files: \.py[i]?$ + exclude: tests/test_tstring.py - id: codespell name: codespell @@ -32,9 +33,11 @@ repos: language: system entry: flake8 files: \.py$ + exclude: tests/test_tstring.py - id: mypy name: mypy language: system entry: mypy --pretty --follow-imports=silent files: \.py[i]?$ + exclude: tests/test_tstring.py diff --git a/pyproject.toml b/pyproject.toml index f3fa58e5d..f8600296b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ disable_memoryview_promotion = true strict = true exclude = '''(?x)( ^ docs/lib/.*\.py + | tests/test_tstring\.py )''' [[tool.mypy.overrides]] @@ -64,3 +65,6 @@ profile = "black" length_sort = true multi_line_output = 9 sort_order = "psycopg" # requires the isort-psycopg module + +[tool.black] +force_exclude = "tests/test_tstring.py"