list/gen: generate lists based on pools

This commit is contained in:
Iain Learmonth 2022-09-26 14:51:11 +01:00
parent de0f472fdc
commit 076de1bc44
7 changed files with 30 additions and 22 deletions

View file

@ -6,10 +6,11 @@ from typing import Callable, Any
from app import app
from app.cli import _SubparserType, BaseCliHandler
from app.lists import lists
from app.models.base import Pool
def dump(list_f: Callable[[], Any]) -> None:
json.dump(list_f(), sys.stdout, indent=2)
def dump(list_f: Callable[[Pool], Any]) -> None:
json.dump(list_f(Pool.query.first()), sys.stdout, indent=2)
class ListCliHandler(BaseCliHandler):