aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/views/admin.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-12 22:07:12 +0100
committerDennis Fink2026-11-12 22:07:12 +0100
commitc7993952c585b66acad5275e39dbf91cf662b975 (patch)
tree976b3746444b3bd0bbb269bef9197c8b6a2e1696 /webmentions_ssg/views/admin.py
parentb930b4425b91aa42abcec6c3443685065a5ca242 (diff)
downloadwebmentions-ssg-c7993952c585b66acad5275e39dbf91cf662b975.tar.gz
webmentions-ssg-c7993952c585b66acad5275e39dbf91cf662b975.zip
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.
Diffstat (limited to 'webmentions_ssg/views/admin.py')
-rw-r--r--webmentions_ssg/views/admin.py21
1 files changed, 7 insertions, 14 deletions
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/<uuid:identifier>/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/<uuid:identifier>/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/<uuid:source_identifier>")
@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