From cbb40a85e3557a5489ebd634d8c1ac2d9d8cbfed Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Tue, 19 May 2020 18:38:40 +0100 Subject: [PATCH] mypy: check modules --- mypy.ini | 2 ++ setup.py | 5 ++++- tox.ini | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/mypy.ini b/mypy.ini index c6ae9ea..f279098 100644 --- a/mypy.ini +++ b/mypy.ini @@ -5,6 +5,8 @@ show_error_codes = True check_untyped_defs = True namespace_packages = True +html_report = mypy-cov + # it's not controled by me, so for now just ignore.. [mypy-my.config.repos.pdfannots.pdfannots] ignore_errors = True diff --git a/setup.py b/setup.py index 2a8f33f..5cfde5d 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,10 @@ def main(): install_requires=['atomicwrites'], extras_require={ 'testing': ['pytest'], - 'linting': ['pytest', 'mypy'], + 'linting': [ + 'pytest', + 'mypy', 'lxml', # lxml for cov report + ], }, ) diff --git a/tox.ini b/tox.ini index 7dfe81f..6f61c93 100644 --- a/tox.ini +++ b/tox.ini @@ -7,12 +7,41 @@ envlist = py3,mypy passenv = CI CI_* commands = - pip install -e .[testing] + pip install .[testing] python -m pytest src [testenv:mypy] skip_install = true commands = - pip install -e .[linting] + pip install .[linting] python -m mypy src + + # TODO fix the modules + pip install HPI + python -m mypy \ + -p modules.github \ + -p modules.hyp2org \ + -p modules.hypothesis \ + # -p modules.instapaper \ + # -p modules.ip2org \ + -p modules.kobo2org \ + # -p modules.kobo \ + -p modules.krill \ + -p modules.materialistic \ + -p modules.movies \ + -p modules.pdfs \ + -p modules.pinboard \ + -p modules.pocket_demo \ + -p modules.pocket \ + -p modules.polar \ + # -p modules.reddit_all \ + # -p modules.reddit \ + -p modules.roamresearch \ + -p modules.rss \ + -p modules.rtm2org \ + -p modules.stackexchange \ + -p modules.twitter_likes \ + -p modules.twitter \ + -p modules.vkfavs \ + -p modules.youtube