]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore: exclude linters run on tstring test module
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 29 Apr 2025 17:09:18 +0000 (19:09 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 8 Sep 2025 09:46:37 +0000 (11:46 +0200)
Currently the tooling doesn't support the syntax yet.

.flake8
.pre-commit-config.yaml
pyproject.toml

diff --git a/.flake8 b/.flake8
index 0cc6c5ff58e135ab1c63295c8cdf378b3530ff8e..42c8600685838f51e21b8f52e8cca638c353cc93 100644 (file)
--- 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
index 86fc7b378e5f6bc8f0434feb7c7bc9c9f540da75..b0f07a05ab82ac4410c267267aeedad499f0e746 100644 (file)
@@ -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
index f3fa58e5da96432eb17ea7eab2c211200d8c0315..f8600296b8edc8b9166f11cc9e61eaae0cc99710 100644 (file)
@@ -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"