From 194b8ad1fc576c6c8a0b7675a7055e7626714883 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Sat, 5 Oct 2019 16:45:06 +0100 Subject: [PATCH] move is_todo to orger --- my/hypothesis.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/my/hypothesis.py b/my/hypothesis.py index bbdd1b0..07d5335 100644 --- a/my/hypothesis.py +++ b/my/hypothesis.py @@ -59,25 +59,13 @@ def get_pages() -> List[Page]: return pages -# TODO is it even necessary? -def get_entries(): +def get_highlights(): return list(_iter()) -def get_todos(): - def is_todo(e: Annotation) -> bool: - if any(t.lower() == 'todo' for t in e.tags): - return True - if e.text is None: - return False - return e.text.lstrip().lower().startswith('todo') - return list(filter(is_todo, get_entries())) - - def test(): get_pages() - get_todos() - get_entries() + get_highlights() def _main():