about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-08-26 10:00:18 -0500
committerFrederick Muriuki Muriithi2026-08-26 10:00:38 -0500
commitc34df781ff313655c78464e0973bc0208be2a585 (patch)
tree8a7f1ee776fbf1634a02c24f69f9da4fe6e8247e
parentde5487f92ab60a10fa72458c1f4b421d4f0a2674 (diff)
downloadgn-auth-c34df781ff313655c78464e0973bc0208be2a585.tar.gz
Lint: Remove unused code and import.
-rw-r--r--gn_auth/auth/authorisation/resources/groups/models.py1
-rw-r--r--gn_auth/auth/authorisation/roles/views.py4
2 files changed, 1 insertions, 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)))