From 8bb89dd929506af37675ed5e65737ac79ca0678e Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 5 Sep 2023 14:41:41 +0300 Subject: Fix C3001: Lambda expression assigned to a variable Signed-off-by: Munyoki Kilyungi --- gn3/auth/authentication/oauth2/endpoints/utilities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gn3/auth/authentication/oauth2/endpoints') diff --git a/gn3/auth/authentication/oauth2/endpoints/utilities.py b/gn3/auth/authentication/oauth2/endpoints/utilities.py index 299f151..e13784e 100644 --- a/gn3/auth/authentication/oauth2/endpoints/utilities.py +++ b/gn3/auth/authentication/oauth2/endpoints/utilities.py @@ -12,7 +12,8 @@ def query_token(# pylint: disable=[unused-argument] endpoint_object: Any, token_str: str, token_type_hint) -> Optional[ OAuth2Token]: """Retrieve the token from the database.""" - __identity__ = lambda val: val + def __identity__(val): + return val token = Nothing with db.connection(current_app.config["AUTH_DB"]) as conn: if token_type_hint == "access_token": -- cgit v1.2.3