~homeworkprod/byceps

1911903e7090154f20a7deaebcd0f20fa764c499 — Jochen Kupperschmidt 9 months ago 26e992e
Make `config_overrides` a keyword-only argument to `create_app`
2 files changed, 7 insertions(+), 2 deletions(-)

M byceps/application.py
M tests/helpers.py
M byceps/application.py => byceps/application.py +1 -0
@@ 29,6 29,7 @@ from .util.views import redirect_to

def create_app(
    config_filename: Union[Path, str],
    *,
    config_overrides: Optional[Dict[str, Any]] = None,
) -> Flask:
    """Create the actual Flask application."""

M tests/helpers.py => tests/helpers.py +6 -2
@@ 35,12 35,16 @@ CONFIG_FILENAME_TEST_ADMIN = _CONFIG_PATH / 'test_admin.py'


def create_admin_app(config_overrides: Optional[Dict[str, Any]] = None):
    app = create_app(CONFIG_FILENAME_TEST_ADMIN, config_overrides)
    app = create_app(
        CONFIG_FILENAME_TEST_ADMIN, config_overrides=config_overrides
    )
    return app


def create_site_app(config_overrides: Optional[Dict[str, Any]] = None):
    app = create_app(CONFIG_FILENAME_TEST_SITE, config_overrides)
    app = create_app(
        CONFIG_FILENAME_TEST_SITE, config_overrides=config_overrides
    )
    return app