aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-11-02 15:31:53 +0300
committerFrederick Muriuki Muriithi2023-11-02 15:31:53 +0300
commit3f5b7ef490b82ab79e3f72ebc5546c9a4118a920 (patch)
tree0355f805a6e4a0b088f9b4bcc525cf07d7fb4f3a
parentfee19ef6e9c5e90d9878a7cff96e761b9b92121b (diff)
downloadgn-auth-3f5b7ef490b82ab79e3f72ebc5546c9a4118a920.tar.gz
pylint: Fix linting errors.
-rw-r--r--gn_auth/auth/authorisation/resources/inbredset/views.py1
-rw-r--r--gn_auth/auth/authorisation/resources/views.py4
-rw-r--r--scripts/link_inbredsets.py2
3 files changed, 3 insertions, 4 deletions
diff --git a/gn_auth/auth/authorisation/resources/inbredset/views.py b/gn_auth/auth/authorisation/resources/inbredset/views.py
index c3669e6..444c442 100644
--- a/gn_auth/auth/authorisation/resources/inbredset/views.py
+++ b/gn_auth/auth/authorisation/resources/inbredset/views.py
@@ -3,7 +3,6 @@ from flask import jsonify, Response, Blueprint
from gn_auth.auth.db import sqlite3 as db
from gn_auth.auth.db.sqlite3 import with_db_connection
-from gn_auth.auth.authentication.oauth2.resource_server import require_oauth
iset = Blueprint("inbredset", __name__)
diff --git a/gn_auth/auth/authorisation/resources/views.py b/gn_auth/auth/authorisation/resources/views.py
index 60c751c..c5da257 100644
--- a/gn_auth/auth/authorisation/resources/views.py
+++ b/gn_auth/auth/authorisation/resources/views.py
@@ -341,14 +341,14 @@ def resources_authorisation():
res.resource_id for res in with_db_connection(public_resources)
if res.resource_id in resource_ids)
with require_oauth.acquire("profile resource") as the_token:
- resources = with_db_connection(lambda conn: user_roles_on_resources(
+ the_resources = with_db_connection(lambda conn: user_roles_on_resources(
conn, the_token.user, resource_ids))
resp = jsonify({
str(resid): {
"public-read": resid in pubres,
"roles": tuple(
dictify(rol) for rol in
- resources.get(resid, {}).get("roles", tuple()))
+ the_resources.get(resid, {}).get("roles", tuple()))
} for resid in resource_ids
})
except _HTTPException as _httpe:
diff --git a/scripts/link_inbredsets.py b/scripts/link_inbredsets.py
index 49cb47c..ac9fa2b 100644
--- a/scripts/link_inbredsets.py
+++ b/scripts/link_inbredsets.py
@@ -110,7 +110,7 @@ def run(authdbpath, mysqldburi):
with (authdb.connection(authdbpath) as authconn,
biodb.database_connection(mysqldburi) as bioconn):
admin = select_sys_admin(sys_admins(authconn))
- unlinked = assign_role_for_admin(authconn, admin, own_resources(
+ assign_role_for_admin(authconn, admin, own_resources(
authconn,
admin_group(authconn, admin),
build_resources(