# 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
+ from Cython.Build import cythonize # type: ignore
# Add include and lib dir for the libpq.
includedir = get_config("includedir")
setup(
ext_modules=[pgext, pqext],
- cmdclass={"build_ext": psycopg_build_ext},
+ cmdclass={"build_ext": psycopg_build_ext}, # type: ignore
)
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