Something weird happens. Certain files pass mypy lint on their own, but
not in combination. This is mostly related to `psycopg/pq/pq_ctypes.py`
and `psycopg/pq/_pq_ctypes.py`. This problem seems largely related to
incomplete ctypes definitions.
+# mypy: ignore-errors
"""
Sphinx plugin to link to the libpq documentation.
+# mypy: ignore-errors
"""
Customisation for docs generation.
"""
-# -*- coding: utf-8 -*-
+# mypy: ignore-errors
"""
sql role
~~~~~~~~
+# mypy: ignore-errors
+
"""
libpq Python wrapper using ctypes bindings.
# In the sdist there are not .pyx, only c, so we don't need Cython.
# Otherwise Cython is a requirement and it is used to compile pyx to c.
if os.path.exists("psycopg_c/_psycopg.pyx"):
- from Cython.Build import cythonize # type: ignore[import-untyped]
+ from Cython.Build import cythonize # type: ignore
for ext in self.distribution.ext_modules:
for i in range(len(ext.sources)):
disable_bytearray_promotion = true
disable_memoryview_promotion = true
strict = true
+exclude = '''(?x)(
+ ^ build/
+ | docs/lib/.*\.py
+ | psycopg/build/
+ | psycopg_binary/build/
+ | psycopg_c/build/
+ | psycopg_pool/build/
+ | tools/build/pg_config_vcpkg_stub/build/
+)'''
[[tool.mypy.overrides]]
module = [
- "shapely.*",
"numpy.*",
+ "shapely.*",
]
ignore_missing_imports = true
-[[tool.mypy.overrides]]
-module = "uvloop"
-ignore_missing_imports = true
-
[[tool.mypy.overrides]]
module = "tests.*"
check_untyped_defs = true
#!/usr/bin/env python3
-r"""Add or edit github users in the backers file
+# mypy: ignore-errors
+"""Add or edit github users in the backers file
"""
import sys