summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2020-12-17 16:28:58 -0800
committerGitHub <noreply@github.com>2020-12-17 19:28:58 -0500
commitd3219c5c2e4dea78955080afaaf251dd3e61bc01 (patch)
treef93ea7243ef9f8370e73c3dcd9137498ccae3884
parentbf39b44f60a94a456b03f4e312f26cc7d82630f5 (diff)
downloadpyjwt-d3219c5c2e4dea78955080afaaf251dd3e61bc01.tar.gz
Cleanup "noqa" comments (#553)
- Remove "noqa" comments that are unnecessary - Remove unused imports from api_jwt.py
-rw-r--r--jwt/algorithms.py2
-rw-r--r--jwt/api_jws.py8
-rw-r--r--jwt/api_jwt.py1
3 files changed, 7 insertions, 4 deletions
diff --git a/jwt/algorithms.py b/jwt/algorithms.py
index 56d328a..efb0673 100644
--- a/jwt/algorithms.py
+++ b/jwt/algorithms.py
@@ -213,7 +213,7 @@ class HMACAlgorithm(Algorithm):
return hmac.compare_digest(sig, self.sign(msg, key))
-if has_crypto: # noqa: C901
+if has_crypto:
class RSAAlgorithm(Algorithm):
"""
diff --git a/jwt/api_jws.py b/jwt/api_jws.py
index cf0d8fb..fe2306b 100644
--- a/jwt/api_jws.py
+++ b/jwt/api_jws.py
@@ -3,8 +3,12 @@ import json
from collections.abc import Mapping
from typing import Dict, List, Optional, Type, Union
-from .algorithms import requires_cryptography # NOQA
-from .algorithms import Algorithm, get_default_algorithms, has_crypto
+from .algorithms import (
+ Algorithm,
+ get_default_algorithms,
+ has_crypto,
+ requires_cryptography,
+)
from .exceptions import (
DecodeError,
InvalidAlgorithmError,
diff --git a/jwt/api_jwt.py b/jwt/api_jwt.py
index 60f319b..6a7f027 100644
--- a/jwt/api_jwt.py
+++ b/jwt/api_jwt.py
@@ -4,7 +4,6 @@ from collections.abc import Iterable, Mapping
from datetime import datetime, timedelta
from typing import Any, Dict, List, Optional, Type, Union
-from .algorithms import Algorithm, get_default_algorithms # NOQA
from .api_jws import PyJWS
from .exceptions import (
DecodeError,