29 lines
1.6 KiB
Python
29 lines
1.6 KiB
Python
"""Пакет `cf config` — подкоманды управления моделью.
|
|
|
|
В пакете ровно один объект Typer — `app` (см. `_app.py`). Подкоманды
|
|
регистрируются декораторами `@app.command()` в модулях семейств сущностей
|
|
(`base_currency`, `rates`, `accounts`, `transactions`, `recurring`, `assets`,
|
|
`liabilities`); модули импортируются здесь ради побочного эффекта — так
|
|
регистрация происходит один раз при первом импорте пакета.
|
|
|
|
Наружу пакет отдаёт только `app`: его подключает к корневому CLI
|
|
`infrastructure/cli/app.py` (`app.add_typer(config.app, name="config")`).
|
|
"""
|
|
|
|
from infrastructure.cli.commands.config._app import app
|
|
|
|
# isort: off
|
|
# Порядок импортов задаёт порядок регистрации команд, а значит и порядок
|
|
# их показа в `cf config --help` — он должен совпадать с прежним монолитом.
|
|
from infrastructure.cli.commands.config import base_currency # noqa: F401
|
|
from infrastructure.cli.commands.config import rates # noqa: F401
|
|
from infrastructure.cli.commands.config import accounts # noqa: F401
|
|
from infrastructure.cli.commands.config import transactions # noqa: F401
|
|
from infrastructure.cli.commands.config import recurring # noqa: F401
|
|
from infrastructure.cli.commands.config import assets # noqa: F401
|
|
from infrastructure.cli.commands.config import liabilities # noqa: F401
|
|
|
|
# isort: on
|
|
|
|
__all__ = ["app"]
|