diff options
author | Frederick Muriuki Muriithi | 2023-07-10 11:36:47 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-07-10 11:36:47 +0300 |
commit | c6ac30d4ccc26553a12e8c37cdf9078cbe9084b3 (patch) | |
tree | a40cea1c2b129e0e37b70d42c6f87fe51a5ec178 /gn3/auth/authentication/oauth2/endpoints | |
parent | edebea34ac6545909737ce9540e9d51858550873 (diff) | |
download | genenetwork3-migrate-to-python3.10.tar.gz |
Fix linting errors caused by bump to Python 3.10migrate-to-python3.10
Diffstat (limited to 'gn3/auth/authentication/oauth2/endpoints')
-rw-r--r-- | gn3/auth/authentication/oauth2/endpoints/introspection.py | 4 | ||||
-rw-r--r-- | gn3/auth/authentication/oauth2/endpoints/utilities.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gn3/auth/authentication/oauth2/endpoints/introspection.py b/gn3/auth/authentication/oauth2/endpoints/introspection.py index a567363..29ade6a 100644 --- a/gn3/auth/authentication/oauth2/endpoints/introspection.py +++ b/gn3/auth/authentication/oauth2/endpoints/introspection.py @@ -24,7 +24,7 @@ class IntrospectionEndpoint(_IntrospectionEndpoint): """Query the token.""" return _query_token(self, token_string, token_type_hint) - def introspect_token(self, token: OAuth2Token) -> dict:# pylint: disable=[no-self-use] + def introspect_token(self, token: OAuth2Token) -> dict: """Return the introspection information.""" url = urlparse(flask_request.url) return { @@ -43,6 +43,6 @@ class IntrospectionEndpoint(_IntrospectionEndpoint): "jti": token.token_id } - def check_permission(self, token, client, request):# pylint: disable=[unused-argument, no-self-use] + def check_permission(self, token, client, request):# pylint: disable=[unused-argument] """Check that the client has permission to introspect token.""" return client.client_type == "internal" diff --git a/gn3/auth/authentication/oauth2/endpoints/utilities.py b/gn3/auth/authentication/oauth2/endpoints/utilities.py index 299f151..b85940d 100644 --- a/gn3/auth/authentication/oauth2/endpoints/utilities.py +++ b/gn3/auth/authentication/oauth2/endpoints/utilities.py @@ -12,7 +12,9 @@ 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): + """Identity function.""" + return val token = Nothing with db.connection(current_app.config["AUTH_DB"]) as conn: if token_type_hint == "access_token": |