diff --git a/doc/example_config/my/config/__init__.py b/doc/example_config/my/config/__init__.py index abffd62..51a0d01 100644 --- a/doc/example_config/my/config/__init__.py +++ b/doc/example_config/my/config/__init__.py @@ -11,3 +11,12 @@ class hypothesis: class instapaper: export_path: Paths = '' + +class pocket: + export_path: Paths = '' + +class github: + export_path: Paths = '' + +class reddit: + export_path: Paths = '' diff --git a/my/reddit.py b/my/reddit.py index 475bd81..981a990 100755 --- a/my/reddit.py +++ b/my/reddit.py @@ -209,8 +209,9 @@ def events(*args, **kwargs) -> List[Event]: inp = inputs() # 2.2s for 300 files without cachew # 0.2s for 300 files with cachew - evit = _get_events(inp, *args, **kwargs) - return list(sorted(evit, key=lambda e: e.cmp_key)) + evit = _get_events(inp, *args, **kwargs) # type: ignore[call-arg] + # todo mypy is confused here and thinks it's iterable of Path? perhaps something to do with mcachew? + return list(sorted(evit, key=lambda e: e.cmp_key)) # type: ignore[attr-defined,arg-type] def stats(): diff --git a/tox.ini b/tox.ini index f88bd3c..d807f29 100644 --- a/tox.ini +++ b/tox.ini @@ -31,11 +31,17 @@ 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/ghexport pip install git+https://github.com/karlicoss/hypexport pip install git+https://github.com/karlicoss/instapexport + pip install git+https://github.com/karlicoss/pockexport + pip install git+https://github.com/karlicoss/rexport # todo I guess use a script... - python3 -m mypy -p my.hypothesis \ - -p my.instapaper \ + python3 -m mypy -p my.github.ghexport \ + -p my.hypothesis \ + -p my.instapaper \ + -p my.pocket \ + -p my.reddit \ --txt-report .mypy-coverage \ --html-report .mypy-coverage \ {posargs}