Skip to content

Commit 08bf8e5

Browse files
authored
Merge pull request #52 from jschlyter/isort
isort everything
2 parents e8789c2 + 43af297 commit 08bf8e5

23 files changed

+50
-31
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ install:
1313
- pip install codecov
1414
- pip install tox
1515
- pip install tox-travis
16+
- pip install isort
1617
script:
18+
- isort --check --recursive src
1719
- codecov --version
1820
- tox
1921
after_success:

setup.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[isort]
2+
multi_line_output = 3
3+
include_trailing_comma = True
4+
force_grid_wrap = 0
5+
use_parentheses = True
6+
line_length = 88

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
2727
fd.read(), re.MULTILINE).group(1)
2828

29-
tests_requires = ['responses', 'pytest']
29+
tests_requires = ['responses', 'pytest', 'isort']
3030

3131
setup(
3232
name="cryptojwt",

src/cryptojwt/jwk/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
import ssl
55
from typing import List
66

7-
from .utils import DIGEST_HASH
87
from ..exception import UnsupportedAlgorithm
98
from ..utils import as_bytes
109
from ..utils import as_unicode
1110
from ..utils import b64e
1211
from ..utils import base64url_to_long
12+
from .utils import DIGEST_HASH
1313

1414
USE = {
1515
'sign': 'sig',

src/cryptojwt/jwk/rsa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
from ..exception import JWKESTException
1212
from ..exception import SerializationNotPossible
1313
from ..exception import UnsupportedKeyType
14+
from ..utils import as_unicode
1415
from ..utils import b64e
1516
from ..utils import deser
1617
from ..utils import long_to_base64
17-
from ..utils import as_unicode
1818
from . import JWK
1919
from .asym import AsymmetricKey
2020

src/cryptojwt/jws/dsa.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
from cryptography.exceptions import InvalidSignature
22
from cryptography.hazmat.primitives import hashes
33
from cryptography.hazmat.primitives.asymmetric import ec
4-
from cryptography.hazmat.primitives.asymmetric.utils import \
5-
decode_dss_signature
6-
from cryptography.hazmat.primitives.asymmetric.utils import \
7-
encode_dss_signature
4+
from cryptography.hazmat.primitives.asymmetric.utils import decode_dss_signature
5+
from cryptography.hazmat.primitives.asymmetric.utils import encode_dss_signature
86
from cryptography.utils import int_from_bytes
97
from cryptography.utils import int_to_bytes
108

src/cryptojwt/jws/jws.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,7 @@
33
import logging
44

55
from cryptojwt.jws.exception import JWSException
6-
from .dsa import ECDSASigner
7-
from .exception import FormatError
8-
from .exception import NoSuitableSigningKeys
9-
from .exception import SignerAlgError
10-
from .hmac import HMACSigner
11-
from .pss import PSSSigner
12-
from .rsa import RSASigner
13-
from .utils import alg2keytype
6+
147
from ..exception import BadSignature
158
from ..exception import UnknownAlgorithm
169
from ..exception import WrongNumberOfParts
@@ -20,6 +13,14 @@
2013
from ..utils import b64d_enc_dec
2114
from ..utils import b64e_enc_dec
2215
from ..utils import b64encode_item
16+
from .dsa import ECDSASigner
17+
from .exception import FormatError
18+
from .exception import NoSuitableSigningKeys
19+
from .exception import SignerAlgError
20+
from .hmac import HMACSigner
21+
from .pss import PSSSigner
22+
from .rsa import RSASigner
23+
from .utils import alg2keytype
2324

2425
try:
2526
from builtins import str

src/cryptojwt/jwx.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from cryptojwt.jwk import JWK
88
from cryptojwt.key_bundle import KeyBundle
9+
910
from .exception import HeaderError
1011
from .jwk.jwk import key_from_jwk_dict
1112
from .jwk.rsa import RSAKey

src/cryptojwt/key_bundle.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from cryptojwt.jwk.ec import NIST2SEC
1212
from cryptojwt.jwk.hmac import new_sym_key
13+
1314
from .exception import JWKException
1415
from .exception import UnknownKeyType
1516
from .exception import UnsupportedAlgorithm

src/cryptojwt/key_issuer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
from .jws.utils import alg2keytype as jws_alg2keytype
99
from .key_bundle import KeyBundle
1010
from .key_bundle import build_key_bundle
11+
from .key_bundle import key_diff
12+
from .key_bundle import update_key_bundle
13+
from .utils import importer
14+
from .utils import qualified_name
1115

1216
__author__ = 'Roland Hedberg'
1317

14-
from .key_bundle import key_diff
15-
from .key_bundle import update_key_bundle
1618

17-
from .utils import importer
1819

19-
from .utils import qualified_name
2020

2121
logger = logging.getLogger(__name__)
2222

0 commit comments

Comments
 (0)