From 09e27e96092f9a2e4f731709b8e8fdcd9835069a Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Thu, 3 Jul 2025 12:17:56 -0500 Subject: Fix minor issues caught by mypy. --- gn_auth/auth/authorisation/users/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gn_auth/auth/authorisation/users/models.py') diff --git a/gn_auth/auth/authorisation/users/models.py b/gn_auth/auth/authorisation/users/models.py index 1b7d8e0..d30bfd0 100644 --- a/gn_auth/auth/authorisation/users/models.py +++ b/gn_auth/auth/authorisation/users/models.py @@ -1,6 +1,5 @@ """Functions for acting on users.""" import uuid -from typing import Union from functools import reduce from datetime import datetime, timedelta @@ -40,7 +39,7 @@ def __process_age_clause__(age_desc: str) -> tuple[str, int]: raise Exception("Invalid age descriptor.")# pylint: disable=[broad-exception-raised] -def __list_user_clauses_and_params__(**kwargs) -> tuple[str, dict[str, Union[int, str]]]: +def __list_user_clauses_and_params__(**kwargs) -> tuple[str, dict[str, str]]: """Process the WHERE clauses, and params for the 'LIST USERS' query.""" clauses = "" params = {} @@ -66,7 +65,7 @@ def __list_user_clauses_and_params__(**kwargs) -> tuple[str, dict[str, Union[int if bool(kwargs.get("age", "").strip()): _clause, _param = __process_age_clause__(kwargs["age"].strip()) clauses = clauses + (" AND " if len(clauses) > 0 else "") + _clause - params["created"] = _param + params["created"] = str(_param) return clauses, params -- cgit v1.2.3