From: Daniele Varrazzo Date: Sun, 29 Mar 2020 05:24:10 +0000 (+1300) Subject: Also run mypy on tests and setup X-Git-Tag: 3.0.dev0~649 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e53f54c9f71e6dfb64fe521ca81ce402003ccee9;p=thirdparty%2Fpsycopg.git Also run mypy on tests and setup Added mypy config to tox.ini --- diff --git a/setup.py b/setup.py index c8f498f98..1c65bfef6 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ psycopg3 -- PostgreSQL database adapter for Python import re import os -from setuptools import setup +from setuptools import setup # type: ignore # Grab the version without importing the module # or we will get import errors on install if prerequisites are still missing diff --git a/tox.ini b/tox.ini index 4ccd7e941..2f9f668ab 100644 --- a/tox.ini +++ b/tox.ini @@ -15,10 +15,17 @@ commands = flake8 deps = flake8 >= 3.7 [testenv:mypy] -commands = mypy psycopg3 +commands = mypy --config-file tox.ini deps = mypy >= 0.770 [flake8] max-line-length = 85 exclude = env, .tox ignore = W503, E203 + +[mypy] +files = psycopg3, tests, setup.py +warn_unused_ignores = True + +[mypy-pytest] +ignore_missing_imports = True