From 6957e52d0d84b2195749655a948bbffd82855458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 3 Mar 2023 01:12:36 +0800 Subject: [PATCH] Renamed the "accounting.account.query", "accounting.base_account.query", "accounting.currency.query", and "accounting.transaction.query" modules to "accounting.account.queries", "accounting.base_account.queries", "accounting.currency.queries", and "accounting.transaction.queries", respectively. There will be more than one query in the next report module. --- src/accounting/account/{query.py => queries.py} | 2 +- src/accounting/account/views.py | 2 +- src/accounting/base_account/{query.py => queries.py} | 2 +- src/accounting/base_account/views.py | 2 +- src/accounting/currency/{query.py => queries.py} | 2 +- src/accounting/currency/views.py | 2 +- src/accounting/transaction/{query.py => queries.py} | 2 +- src/accounting/transaction/views.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) rename src/accounting/account/{query.py => queries.py} (98%) rename src/accounting/base_account/{query.py => queries.py} (98%) rename src/accounting/currency/{query.py => queries.py} (98%) rename src/accounting/transaction/{query.py => queries.py} (98%) diff --git a/src/accounting/account/query.py b/src/accounting/account/queries.py similarity index 98% rename from src/accounting/account/query.py rename to src/accounting/account/queries.py index d74a6bf..bb0cf3f 100644 --- a/src/accounting/account/query.py +++ b/src/accounting/account/queries.py @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""The account query. +"""The account queries. """ import sqlalchemy as sa diff --git a/src/accounting/account/views.py b/src/accounting/account/views.py index 961295d..20259bc 100644 --- a/src/accounting/account/views.py +++ b/src/accounting/account/views.py @@ -33,7 +33,7 @@ from accounting.utils.pagination import Pagination from accounting.utils.permission import can_view, has_permission, can_edit from accounting.utils.user import get_current_user_pk from .forms import AccountForm, sort_accounts_in, AccountReorderForm -from .query import get_account_query +from .queries import get_account_query bp: Blueprint = Blueprint("account", __name__) """The view blueprint for the account management.""" diff --git a/src/accounting/base_account/query.py b/src/accounting/base_account/queries.py similarity index 98% rename from src/accounting/base_account/query.py rename to src/accounting/base_account/queries.py index 82e45ac..7df91f5 100644 --- a/src/accounting/base_account/query.py +++ b/src/accounting/base_account/queries.py @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""The base account query. +"""The base account queries. """ import sqlalchemy as sa diff --git a/src/accounting/base_account/views.py b/src/accounting/base_account/views.py index 032b9ab..af2e981 100644 --- a/src/accounting/base_account/views.py +++ b/src/accounting/base_account/views.py @@ -34,7 +34,7 @@ def list_accounts() -> str: :return: The account list. """ - from .query import get_base_account_query + from .queries import get_base_account_query accounts: list[BaseAccount] = get_base_account_query() pagination: Pagination = Pagination[BaseAccount](accounts) return render_template("accounting/base-account/list.html", diff --git a/src/accounting/currency/query.py b/src/accounting/currency/queries.py similarity index 98% rename from src/accounting/currency/query.py rename to src/accounting/currency/queries.py index 4321f07..7bf0c9e 100644 --- a/src/accounting/currency/query.py +++ b/src/accounting/currency/queries.py @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""The currency query. +"""The currency queries. """ import sqlalchemy as sa diff --git a/src/accounting/currency/views.py b/src/accounting/currency/views.py index 5312772..2dba542 100644 --- a/src/accounting/currency/views.py +++ b/src/accounting/currency/views.py @@ -47,7 +47,7 @@ def list_currencies() -> str: :return: The currency list. """ - from .query import get_currency_query + from .queries import get_currency_query currencies: list[Currency] = get_currency_query() pagination: Pagination = Pagination[Currency](currencies) return render_template("accounting/currency/list.html", diff --git a/src/accounting/transaction/query.py b/src/accounting/transaction/queries.py similarity index 98% rename from src/accounting/transaction/query.py rename to src/accounting/transaction/queries.py index 5c78506..a231d5a 100644 --- a/src/accounting/transaction/query.py +++ b/src/accounting/transaction/queries.py @@ -14,7 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""The transaction query. +"""The transaction queries. """ from datetime import datetime diff --git a/src/accounting/transaction/views.py b/src/accounting/transaction/views.py index bda83cc..419db88 100644 --- a/src/accounting/transaction/views.py +++ b/src/accounting/transaction/views.py @@ -35,7 +35,7 @@ from accounting.utils.permission import has_permission, can_view, can_edit from accounting.utils.user import get_current_user_pk from .dispatcher import TransactionType, get_txn_type, TXN_TYPE_OBJ from .forms import sort_transactions_in, TransactionReorderForm -from .query import get_transaction_query +from .queries import get_transaction_query from .template import with_type, to_transfer, format_amount, \ format_amount_input, format_date, text2html, currency_options, \ default_currency_code