From c7993952c585b66acad5275e39dbf91cf662b975 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Thu, 12 Nov 2026 22:07:12 +0100 Subject: chore(core): enable stricter Ruff lint rules Expand Ruff checks for bugbear, complexity, pathlib, return statements, simplifications, upgrades, and docstring style. Apply the resulting behavior-neutral cleanup across application and test code. --- webmentions_ssg/views/admin.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'webmentions_ssg/views/admin.py') diff --git a/webmentions_ssg/views/admin.py b/webmentions_ssg/views/admin.py index 46e3b18..2f3f3ab 100644 --- a/webmentions_ssg/views/admin.py +++ b/webmentions_ssg/views/admin.py @@ -24,8 +24,7 @@ from . import root_page @root_page.route("/received") @login_required def received() -> ResponseReturnValue: - """ - Display received Webmentions. + """Display received Webmentions. :return: Rendered page containing the paginated received Webmentions. """ @@ -45,8 +44,7 @@ def received() -> ResponseReturnValue: @root_page.post("/received//delete") @login_required def delete_received_webmention(identifier: uuid.UUID) -> ResponseReturnValue: - """ - Delete a received Webmention. + """Delete a received Webmention. :param identifier: Identifier of the Webmention to delete. :return: Redirect response to the received Webmentions view. @@ -74,8 +72,7 @@ def delete_received_webmention(identifier: uuid.UUID) -> ResponseReturnValue: @root_page.post("/received//reverify") @login_required def reverify_received_webmention(identifier: uuid.UUID) -> ResponseReturnValue: - """ - Queue a received Webmention for reverification. + """Queue a received Webmention for reverification. The Webmention status is reset before a new verification task is queued. @@ -108,8 +105,7 @@ def reverify_received_webmention(identifier: uuid.UUID) -> ResponseReturnValue: @root_page.route("/sent") @login_required def sent() -> ResponseReturnValue: - """ - Display sources with sent Webmentions. + """Display sources with sent Webmentions. :return: Rendered page containing the paginated source list. """ @@ -130,8 +126,7 @@ def sent() -> ResponseReturnValue: @root_page.post("/sent/rescan") @login_required def rescan_sent_sources() -> ResponseReturnValue: - """ - Queue a manual scan of sent Webmention sources. + """Queue a manual scan of sent Webmention sources. :return: Redirect response to the sent Webmentions view. """ @@ -145,8 +140,7 @@ def rescan_sent_sources() -> ResponseReturnValue: @root_page.route("/sent/") @login_required def sent_source(source_identifier: uuid.UUID) -> ResponseReturnValue: - """ - Display the sent Webmentions associated with a source. + """Display the sent Webmentions associated with a source. :param source_identifier: Identifier of the source to display. :return: Rendered source details page. @@ -179,8 +173,7 @@ def sent_source(source_identifier: uuid.UUID) -> ResponseReturnValue: def resend_sent_webmention( source_identifier: uuid.UUID, webmention_identifier: uuid.UUID ) -> ResponseReturnValue: - """ - Queue an outgoing Webmention to be sent again. + """Queue an outgoing Webmention to be sent again. The current desired source revision is reopened for processing so the sender task does not treat the Webmention as already completed. Historical -- cgit v1.3.1