CI: add mypy checks for my.reddit, my.pocket and my.github.ghexport
This commit is contained in:
parent
0682919449
commit
1c20eb27aa
3 changed files with 20 additions and 4 deletions
|
@ -11,3 +11,12 @@ class hypothesis:
|
||||||
|
|
||||||
class instapaper:
|
class instapaper:
|
||||||
export_path: Paths = ''
|
export_path: Paths = ''
|
||||||
|
|
||||||
|
class pocket:
|
||||||
|
export_path: Paths = ''
|
||||||
|
|
||||||
|
class github:
|
||||||
|
export_path: Paths = ''
|
||||||
|
|
||||||
|
class reddit:
|
||||||
|
export_path: Paths = ''
|
||||||
|
|
|
@ -209,8 +209,9 @@ def events(*args, **kwargs) -> List[Event]:
|
||||||
inp = inputs()
|
inp = inputs()
|
||||||
# 2.2s for 300 files without cachew
|
# 2.2s for 300 files without cachew
|
||||||
# 0.2s for 300 files with cachew
|
# 0.2s for 300 files with cachew
|
||||||
evit = _get_events(inp, *args, **kwargs)
|
evit = _get_events(inp, *args, **kwargs) # type: ignore[call-arg]
|
||||||
return list(sorted(evit, key=lambda e: e.cmp_key))
|
# 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():
|
def stats():
|
||||||
|
|
8
tox.ini
8
tox.ini
|
@ -31,11 +31,17 @@ setenv = MYPYPATH=doc/example_config
|
||||||
commands =
|
commands =
|
||||||
# TODO ugh. somehow, user installed (editable??) packages leak into this environment??
|
# TODO ugh. somehow, user installed (editable??) packages leak into this environment??
|
||||||
pip install -e .[testing] .[optional]
|
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/hypexport
|
||||||
pip install git+https://github.com/karlicoss/instapexport
|
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...
|
# todo I guess use a script...
|
||||||
python3 -m mypy -p my.hypothesis \
|
python3 -m mypy -p my.github.ghexport \
|
||||||
|
-p my.hypothesis \
|
||||||
-p my.instapaper \
|
-p my.instapaper \
|
||||||
|
-p my.pocket \
|
||||||
|
-p my.reddit \
|
||||||
--txt-report .mypy-coverage \
|
--txt-report .mypy-coverage \
|
||||||
--html-report .mypy-coverage \
|
--html-report .mypy-coverage \
|
||||||
{posargs}
|
{posargs}
|
||||||
|
|
Loading…
Add table
Reference in a new issue