list/gen: generate lists based on pools
This commit is contained in:
parent
de0f472fdc
commit
076de1bc44
7 changed files with 30 additions and 22 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue