From: Daniele Varrazzo Date: Mon, 11 May 2020 06:23:48 +0000 (+1200) Subject: mypy test on setup.py dropped X-Git-Tag: 3.0.dev0~530 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2c287e4f75d26f7d4b46bf40502bab97ba7ae213;p=thirdparty%2Fpsycopg.git mypy test on setup.py dropped Types info for distutils are utterly broken. --- diff --git a/setup.py b/setup.py index 22ab0c46b..81020776a 100644 --- a/setup.py +++ b/setup.py @@ -9,12 +9,12 @@ psycopg3 -- PostgreSQL database adapter for Python import re import os import subprocess as sp -from setuptools import setup, find_packages, Extension # type: ignore -from distutils.command.build_ext import build_ext # type: ignore +from setuptools import setup, find_packages, Extension +from distutils.command.build_ext import build_ext from distutils import log try: - from Cython.Build import cythonize # type: ignore + from Cython.Build import cythonize except ImportError: cythonize = None @@ -44,7 +44,7 @@ Topic :: Software Development :: Libraries :: Python Modules """ -class our_build_ext(build_ext): # type: ignore +class our_build_ext(build_ext): def finalize_options(self) -> None: self._setup_ext_build() super().finalize_options() @@ -56,9 +56,7 @@ class our_build_ext(build_ext): # type: ignore try: from Cython.Build import cythonize except ImportError: - log.warn( - "Cython is not available: the C module will not be built", () - ) + log.warn("Cython is not available: the C module will not be built") return try: diff --git a/tox.ini b/tox.ini index cb0d47a6c..80d9b1e13 100644 --- a/tox.ini +++ b/tox.ini @@ -24,7 +24,7 @@ exclude = env, .tox, .eggs ignore = W503, E203 [mypy] -files = psycopg3, setup.py +files = psycopg3 warn_unused_ignores = True strict = True