Skip to content

Commit

Permalink
mypy: check modules
Browse files Browse the repository at this point in the history
  • Loading branch information
karlicoss committed May 19, 2020
1 parent 03786a3 commit cbb40a8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
2 changes: 2 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ def main():
install_requires=['atomicwrites'],
extras_require={
'testing': ['pytest'],
'linting': ['pytest', 'mypy'],
'linting': [
'pytest',
'mypy', 'lxml', # lxml for cov report
],
},
)

Expand Down
33 changes: 31 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cbb40a8

Please sign in to comment.