aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/db_helpers.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-14 18:44:23 +0100
committerDennis Fink2026-11-14 18:44:23 +0100
commit968e1b4e4a6fbd5a15037cdb11a3f9dee5108570 (patch)
tree0096a0125c4d94a047e5bd24288e1f3f4a58ada5 /webmentions_ssg/db_helpers.py
parent2366d455c7d1ae16c84e0bcbffb94ed762c16832 (diff)
downloadwebmentions-ssg-968e1b4e4a6fbd5a15037cdb11a3f9dee5108570.tar.gz
webmentions-ssg-968e1b4e4a6fbd5a15037cdb11a3f9dee5108570.zip
docs(core): standardize reST docstrings
Expand function and method documentation with consistent reST parameter, return, and exception fields while clarifying behavior where additional context is useful. Normalize test and migration docstrings to the same documentation conventions.
Diffstat (limited to 'webmentions_ssg/db_helpers.py')
-rw-r--r--webmentions_ssg/db_helpers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/webmentions_ssg/db_helpers.py b/webmentions_ssg/db_helpers.py
index 6e1c2d2..d4cc148 100644
--- a/webmentions_ssg/db_helpers.py
+++ b/webmentions_ssg/db_helpers.py
@@ -10,5 +10,9 @@ from sqlalchemy.engine import CursorResult, Result
def rows_affected(result: Result[Any]) -> int:
- """Return the row count from a SQL UPDATE or DELETE result."""
+ """Return the row count from a SQL UPDATE or DELETE result.
+
+ :param result: SQLAlchemy result of an UPDATE or DELETE operation.
+ :returns: Number of rows affected by the statement.
+ """
return cast(CursorResult[Any], result).rowcount