my.instapaper: add stat; add mypy checks on CI
This commit is contained in:
parent
3404b3fcf1
commit
dc642b5a6d
3 changed files with 17 additions and 4 deletions
|
@ -2,8 +2,12 @@
|
|||
Feel free to remove this if you don't need it/add your own custom settings and use them
|
||||
"""
|
||||
|
||||
from my.core import Paths
|
||||
|
||||
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: Paths = '/path/to/hypothesis/data'
|
||||
|
||||
class instapaper:
|
||||
export_path: Paths = ''
|
||||
|
|
|
@ -6,9 +6,8 @@ REQUIRES = [
|
|||
]
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
|
||||
from .core import Paths, PathIsh
|
||||
from .core import Paths
|
||||
|
||||
from my.config import instapaper as user_config
|
||||
|
||||
|
@ -54,6 +53,12 @@ def pages() -> Iterable[Page]:
|
|||
return _dal().pages()
|
||||
|
||||
|
||||
def stats():
|
||||
from .core import stat
|
||||
return stat(pages)
|
||||
|
||||
### misc
|
||||
|
||||
# TODO dunno, move this to private?
|
||||
def is_todo(hl: Highlight) -> bool:
|
||||
note = hl.note or ''
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -32,7 +32,11 @@ 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}
|
||||
pip install git+https://github.com/karlicoss/instapexport
|
||||
# todo I guess use a script...
|
||||
python3 -m mypy -p my.hypothesis \
|
||||
-p my.instapaper \
|
||||
{posargs}
|
||||
|
||||
|
||||
# ideally, keep core modules only here
|
||||
|
|
Loading…
Add table
Reference in a new issue