From c34df781ff313655c78464e0973bc0208be2a585 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 26 Aug 2026 10:00:18 -0500 Subject: Lint: Remove unused code and import. --- gn_auth/auth/authorisation/resources/groups/models.py | 1 - gn_auth/auth/authorisation/roles/views.py | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/gn_auth/auth/authorisation/resources/groups/models.py b/gn_auth/auth/authorisation/resources/groups/models.py index 68f4ea0..60d4634 100644 --- a/gn_auth/auth/authorisation/resources/groups/models.py +++ b/gn_auth/auth/authorisation/resources/groups/models.py @@ -18,7 +18,6 @@ from gn_auth.auth.authentication.users import User, user_by_id from gn_auth.auth.authorisation.checks import authorised_p from gn_auth.auth.authorisation.privileges import Privilege from gn_auth.auth.authorisation.resources.errors import MissingGroupError -from gn_auth.auth.authorisation.resources.system.models import system_resource from gn_auth.auth.authorisation.resources.base import ( Resource, resource_from_dbrow) diff --git a/gn_auth/auth/authorisation/roles/views.py b/gn_auth/auth/authorisation/roles/views.py index dda6f87..163d67e 100644 --- a/gn_auth/auth/authorisation/roles/views.py +++ b/gn_auth/auth/authorisation/roles/views.py @@ -17,9 +17,7 @@ roles = Blueprint("roles", __name__) @require_oauth("profile role") def view_role(role_id: uuid.UUID) -> Response: """Retrieve a user role with id `role_id`""" - def __error__(exc: Exception): - raise exc - with require_oauth.acquire("profile role") as the_token: + with require_oauth.acquire("profile role") as _token: db_uri = current_app.config["AUTH_DB"] with db.connection(db_uri) as conn: return jsonify(asdict(role_by_id(conn, role_id))) -- cgit 1.4.1