From 85b10c38f39732421a230d938adddc7805d0e001 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Mon, 16 Nov 2026 09:27:29 +0100 Subject: style(core): reorder module declarations Group globals and data classes near module imports, keep primary classes and functions together, and move implementation helpers after their public callers. Reorder Alembic setup so configuration happens after the required helpers are defined, without changing runtime behavior. --- webmentions_ssg/cli.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'webmentions_ssg/cli.py') diff --git a/webmentions_ssg/cli.py b/webmentions_ssg/cli.py index 225a39f..3448bbb 100644 --- a/webmentions_ssg/cli.py +++ b/webmentions_ssg/cli.py @@ -18,6 +18,8 @@ from .extensions import db, mail from .models import User USERS_CLI = AppGroup("users", help="Manage users.") +MAIL_CLI = AppGroup("mail", help="Handle mail") +DB_CLI = AppGroup("db", help="Handle database") def _get_user_or_fail(username: str): @@ -118,9 +120,6 @@ def delete_user(username: str, yes: bool) -> None: click.echo(f"Deleted user {username!r}.") -MAIL_CLI = AppGroup("mail", help="Handle mail") - - @MAIL_CLI.command("test", help="Send an email to test the SMTP configuration") @click.option("--to", "recipient", help="Recipient address (defaults to DIGEST_EMAIL).") def send_test_mail(recipient: str | None) -> None: @@ -157,9 +156,6 @@ def send_test_mail(recipient: str | None) -> None: click.echo(f"Test email sent to {recipient}.") -DB_CLI = AppGroup("db", help="Handle database") - - def _existing_table_names() -> set[str]: """Return existing table names without modifying the database schema. -- cgit v1.3.1