diff --git a/doc/example_config/my/config/__init__.py b/doc/example_config/my/config/__init__.py index dd427b6..f93155c 100644 --- a/doc/example_config/my/config/__init__.py +++ b/doc/example_config/my/config/__init__.py @@ -3,6 +3,7 @@ Feel free to remove this if you don't need it/add your own custom settings and u """ class hypothesis: + from my.core import Paths # expects outputs from https://github.com/karlicoss/hypexport # (it's just the standard Hypothes.is export format) - export_path = '/path/to/hypothesis/data' + export_path: Paths = '/path/to/hypothesis/data' diff --git a/setup.py b/setup.py index f2c2b03..657ed1d 100644 --- a/setup.py +++ b/setup.py @@ -53,6 +53,7 @@ def main(): 'pytest', 'pylint', 'mypy', + 'lxml', # for mypy coverage # used in some tests 'pandas', diff --git a/tox.ini b/tox.ini index f5fabca..1df1034 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 3.5 -envlist = py3,mypy # pylint +envlist = py3,mypy,mypy-modules # pylint # TODO ugh. unclear how to reuse setup.cfg deps in tox [testenv] @@ -24,6 +24,18 @@ commands = commands = ./demo.py +# specific modules that are known to be mypy compliant (to avoid false negatives) +[testenv:mypy-modules] +# todo add a stub with all the various configs for mypy/doc +setenv = MYPYPATH=doc/example_config +commands = + # TODO ugh. somehow, user installed (editable??) packages leak into this environment?? + pip install -e .[testing] .[optional] + pip install git+https://github.com/karlicoss/hypexport + python3 -m mypy -p my.hypothesis {posargs} + + +# ideally, keep core modules only here [testenv:mypy] skip_install = true commands =