about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-09-04 22:49:54 +0300
committerBonfaceKilz2023-09-05 14:57:51 +0300
commitb1916a0c0f2656847f07a174f8e8f8a863f4d282 (patch)
treed253c1873826dd7f9a4af256c4bfda123e014d2b
parent5d402e298cb3555b53978406479e2c5969ff38e2 (diff)
downloadgenenetwork3-b1916a0c0f2656847f07a174f8e8f8a863f4d282.tar.gz
Remove pylint skip
* gn3/auth/authentication/oauth2/models/oauth2token.py
(introspect_token, check_permission): Delete "pylint:
disable=[no-self-use]".  R0022: Useless option value for 'disable',
'no-self-use' was moved to an optional extension, see
https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers.
* gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py
(delete_authorization_code): Ditto.
* tests/unit/test_heatmaps.py (test_cluster_traits):
Delete "pylint: disable=R0201".  R0022: Useless option value for
'disable', 'no-self-use' was moved to an optional extension, see
https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers.
* tests/unit/computations/test_partial_correlations.py
(test_tissue_correlation): Ditto.

Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r--gn3/auth/authentication/oauth2/endpoints/introspection.py4
-rw-r--r--gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py2
-rw-r--r--tests/unit/computations/test_partial_correlations.py2
-rw-r--r--tests/unit/test_heatmaps.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/gn3/auth/authentication/oauth2/endpoints/introspection.py b/gn3/auth/authentication/oauth2/endpoints/introspection.py
index a567363..cfe2998 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):
         """Check that the client has permission to introspect token."""
         return client.client_type == "internal"
diff --git a/gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py b/gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py
index f80d02e..fb8d436 100644
--- a/gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py
+++ b/gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py
@@ -41,7 +41,7 @@ class AuthorisationCodeGrant(grants.AuthorizationCodeGrant):
         """Retrieve the code from the database."""
         return __query_authorization_code__(code, client)
 
-    def delete_authorization_code(self, authorization_code):# pylint: disable=[no-self-use]
+    def delete_authorization_code(self, authorization_code):
         """Delete the authorisation code."""
         with db.connection(app.config["AUTH_DB"]) as conn:
             with db.cursor(conn) as cursor:
diff --git a/tests/unit/computations/test_partial_correlations.py b/tests/unit/computations/test_partial_correlations.py
index 20cd6bc..066c650 100644
--- a/tests/unit/computations/test_partial_correlations.py
+++ b/tests/unit/computations/test_partial_correlations.py
@@ -234,7 +234,7 @@ class TestPartialCorrelations(TestCase):
                     tissue_correlation(primary, target, method)
 
     @pytest.mark.unit_test
-    def test_tissue_correlation(self): # pylint: disable=R0201
+    def test_tissue_correlation(self):
         """
         Test that the correct correlation values are computed for the given:
         - primary trait
diff --git a/tests/unit/test_heatmaps.py b/tests/unit/test_heatmaps.py
index 8781d6f..3d4fc78 100644
--- a/tests/unit/test_heatmaps.py
+++ b/tests/unit/test_heatmaps.py
@@ -29,7 +29,7 @@ class TestHeatmap(TestCase):
     """Class for testing heatmap computation functions"""
 
     @pytest.mark.unit_test
-    def test_cluster_traits(self): # pylint: disable=R0201
+    def test_cluster_traits(self):
         """
         Test that the clustering is working as expected.
         """