Skip to content

Commit 31494c9

Browse files
committed
Fix all flake8 issues tox is complaining about
1 parent 2fec851 commit 31494c9

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

jwt/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,6 @@ def main():
131131
else:
132132
p.print_help()
133133

134+
134135
if __name__ == '__main__':
135136
main()

jwt/algorithms.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def _get_crypto_algorithms():
6161
return crypto_algorithms
6262

6363

64-
6564
def get_default_algorithms():
6665
"""
6766
Returns the algorithms that are implemented by the library.
@@ -89,7 +88,6 @@ def get_crypto_algorithms():
8988
return set(crypto_algorithms)
9089

9190

92-
9391
class Algorithm(object):
9492
"""
9593
The interface for an algorithm used to sign and verify tokens.
@@ -201,6 +199,7 @@ def sign(self, msg, key):
201199
def verify(self, msg, key, sig):
202200
return constant_time_compare(sig, self.sign(msg, key))
203201

202+
204203
if has_crypto:
205204

206205
class RSAAlgorithm(Algorithm):

jwt/api_jws.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from collections import Mapping
66

77
from .algorithms import (
8-
Algorithm, get_default_algorithms, has_crypto, get_crypto_algorithms # NOQA
8+
Algorithm, get_crypto_algorithms, get_default_algorithms, has_crypto # NOQA
99
)
1010
from .compat import binary_type, string_types, text_type
1111
from .exceptions import DecodeError, InvalidAlgorithmError, InvalidTokenError
@@ -204,6 +204,7 @@ def _validate_kid(self, kid):
204204
if not isinstance(kid, string_types):
205205
raise InvalidTokenError('Key ID header parameter must be a string')
206206

207+
207208
_jws_global_obj = PyJWS()
208209
encode = _jws_global_obj.encode
209210
decode = _jws_global_obj.decode

tests/keys/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def load_hmac_key():
1919

2020
return base64url_decode(force_bytes(keyobj['k']))
2121

22+
2223
try:
2324
from cryptography.hazmat.primitives.asymmetric import ec
2425
from cryptography.hazmat.backends import default_backend

tests/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def key_path(key_name):
1313
return os.path.join(os.path.dirname(os.path.realpath(__file__)),
1414
'keys', key_name)
1515

16+
1617
# Borrowed from `cryptography`
1718
if hasattr(int, "from_bytes"):
1819
int_from_bytes = int.from_bytes

0 commit comments

Comments
 (0)