]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Also run mypy on tests and setup
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 29 Mar 2020 05:24:10 +0000 (18:24 +1300)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 29 Mar 2020 05:24:27 +0000 (18:24 +1300)
Added mypy config to tox.ini

setup.py
tox.ini

index c8f498f98f22c0a4a1d0f8a570b3c0a21dd5130b..1c65bfef6264664587a3411842eb5c9a2fced453 100644 (file)
--- 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 4ccd7e941e6a459467de9f97edbf8c9732684af6..2f9f668aba71709d45dc778a780967c6c9bcfbdc 100644 (file)
--- 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