From 399afe56c86676df9fc9ae53c90d4fee4bc75831 Mon Sep 17 00:00:00 2001 From: imacat Date: Tue, 7 Feb 2023 11:40:48 +0800 Subject: [PATCH] Added the initial values for the database instance, the user class and the user primary key column, to allow the Sphinx documentation system to work properly. --- src/accounting/database.py | 2 +- src/accounting/utils/user.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/accounting/database.py b/src/accounting/database.py index 96ad6e6..652763b 100644 --- a/src/accounting/database.py +++ b/src/accounting/database.py @@ -25,7 +25,7 @@ time. from flask_sqlalchemy import SQLAlchemy -db: SQLAlchemy +db: SQLAlchemy = SQLAlchemy() """The database instance.""" diff --git a/src/accounting/utils/user.py b/src/accounting/utils/user.py index dae6739..1d2a243 100644 --- a/src/accounting/utils/user.py +++ b/src/accounting/utils/user.py @@ -72,9 +72,9 @@ class AbstractUserUtils(t.Generic[T], ABC): __user_utils: AbstractUserUtils """The user utilities.""" -user_cls: t.Type[Model] +user_cls: t.Type[Model] = Model """The user class.""" -user_pk_column: sa.Column +user_pk_column: sa.Column = sa.Column(sa.Integer) """The primary key column of the user class."""