use cproperty from kython
This commit is contained in:
parent
63fd835386
commit
9f688cb50a
1 changed files with 9 additions and 6 deletions
|
@ -7,8 +7,8 @@ from pytz import UTC
|
|||
from datetime import datetime
|
||||
import os
|
||||
|
||||
from kython import group_by_key
|
||||
from kython.misc import the
|
||||
from kython import group_by_key, the, cproperty
|
||||
|
||||
|
||||
_PATH = '/L/backups/hypothesis/'
|
||||
|
||||
|
@ -26,10 +26,6 @@ class Entry(NamedTuple):
|
|||
hyp_link: str
|
||||
|
||||
|
||||
# TODO kython??
|
||||
cache = lru_cache()
|
||||
cproperty = lambda f: property(cache(f))
|
||||
|
||||
class Page(NamedTuple):
|
||||
highlights: Sequence[Entry]
|
||||
|
||||
|
@ -106,6 +102,13 @@ def get_todos():
|
|||
return e.annotation.lstrip().lower().startswith('todo')
|
||||
return list(filter(is_todo, get_entries()))
|
||||
|
||||
|
||||
def test():
|
||||
get_pages()
|
||||
get_todos()
|
||||
get_entries()
|
||||
|
||||
|
||||
def _main():
|
||||
for page in get_pages():
|
||||
print(page)
|
||||
|
|
Loading…
Add table
Reference in a new issue