From d6bdb288650768cf09f21fb42be7cd2603e34b9f Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 27 Oct 2016 09:26:18 +1300 Subject: [PATCH] Add mypy to lint An extremely modest beginning, but we'll roll this out over the whole codebase in time. Also move flake8 and mypy dependencies into setup[dev]. --- setup.py | 3 +++ tox.ini | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 4165b3675..dfb410758 100644 --- a/setup.py +++ b/setup.py @@ -91,6 +91,9 @@ setup( ':sys_platform != "win32"': [ ], 'dev': [ + "flake8>=2.6.2, <3.1", + "mypy-lang>=0.4.5, <4.6", + "rstcheck>=2.2, <3.0", "tox>=2.3, <3", "mock>=2.0, <2.1", "pytest>=3, <3.1", diff --git a/tox.ini b/tox.ini index 0b183da8b..6a75aaed5 100644 --- a/tox.ini +++ b/tox.ini @@ -18,9 +18,7 @@ changedir = docs commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html [testenv:lint] -deps = - flake8>=2.6.2, <3.1 - rstcheck>=2.2, <3.0 commands = flake8 --jobs 8 --count mitmproxy pathod examples test - rstcheck README.rst \ No newline at end of file + rstcheck README.rst + mypy -s ./mitmproxy/addonmanager.py