aboutsummaryrefslogtreecommitdiff
path: root/gn3/auth/authentication/oauth2/models
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-07-10 11:36:47 +0300
committerFrederick Muriuki Muriithi2023-07-10 11:36:47 +0300
commitc6ac30d4ccc26553a12e8c37cdf9078cbe9084b3 (patch)
treea40cea1c2b129e0e37b70d42c6f87fe51a5ec178 /gn3/auth/authentication/oauth2/models
parentedebea34ac6545909737ce9540e9d51858550873 (diff)
downloadgenenetwork3-c6ac30d4ccc26553a12e8c37cdf9078cbe9084b3.tar.gz
Fix linting errors caused by bump to Python 3.10migrate-to-python3.10
Diffstat (limited to 'gn3/auth/authentication/oauth2/models')
-rw-r--r--gn3/auth/authentication/oauth2/models/oauth2token.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gn3/auth/authentication/oauth2/models/oauth2token.py b/gn3/auth/authentication/oauth2/models/oauth2token.py
index 72e20cc..981e730 100644
--- a/gn3/auth/authentication/oauth2/models/oauth2token.py
+++ b/gn3/auth/authentication/oauth2/models/oauth2token.py
@@ -51,7 +51,9 @@ class OAuth2Token(NamedTuple):
return self.revoked
def __token_from_resultset__(conn: db.DbConnection, rset) -> Maybe:
- __identity__ = lambda val: val
+ def __identity__(val):
+ """Identity function."""
+ return val
try:
the_user = user_by_id(conn, uuid.UUID(rset["user_id"]))
except NotFoundError as _nfe: