aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/cli/users.py
diff options
context:
space:
mode:
authorDennis Fink2026-10-27 23:49:24 +0100
committerDennis Fink2026-10-27 23:49:24 +0100
commitc6a40d741c41cdc0af38eef89247c2120dcb6270 (patch)
tree414df73642a42f4e24b3a0b4bb2bf914d678583d /webmentions_ssg/cli/users.py
parent17ab56a3c7d3dbb3d66edf380ab637a61cefe50c (diff)
downloadwebmentions-ssg-c6a40d741c41cdc0af38eef89247c2120dcb6270.tar.gz
webmentions-ssg-c6a40d741c41cdc0af38eef89247c2120dcb6270.zip
fix(core): resolve static type checking issues
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/cli/users.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/webmentions_ssg/cli/users.py b/webmentions_ssg/cli/users.py
index 4ece2f4..7c6afde 100644
--- a/webmentions_ssg/cli/users.py
+++ b/webmentions_ssg/cli/users.py
@@ -2,9 +2,12 @@
#
# SPDX-License-Identifier: BSD-3-Clause
+"""Provide commands for managing application user accounts."""
+
import click
import sqlalchemy as sa
from flask.cli import AppGroup
+from sqlalchemy.exc import IntegrityError
from .. import DATABASE
@@ -47,7 +50,7 @@ def create_user(username: str, password: str) -> None:
DATABASE.session.add(User(username=username, password=password))
try:
DATABASE.session.commit()
- except sa.exc.IntegrityError as exc:
+ except IntegrityError as exc:
DATABASE.session.rollback()
raise click.ClickException(f"User {username!r} already exists.") from exc