Skip to content

Commit 43af297

Browse files
committed
isort everything
1 parent e23a869 commit 43af297

20 files changed

+41
-30
lines changed

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

src/cryptojwt/key_jar.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
from requests import request
77

8-
from .exception import UnknownKeyType, KeyIOError, UpdateFailed, IssuerNotFound
8+
from .exception import IssuerNotFound
9+
from .exception import KeyIOError
10+
from .exception import UnknownKeyType
11+
from .exception import UpdateFailed
912
from .jwe.jwe import alg2keytype as jwe_alg2keytype
1013
from .jws.utils import alg2keytype as jws_alg2keytype
1114
from .key_bundle import KeyBundle

src/cryptojwt/tools/jwtpeek.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
import os
88
import sys
99

10-
from cryptojwt.key_issuer import KeyIssuer
10+
from pygments import highlight
11+
from pygments.formatters.terminal import TerminalFormatter
12+
from pygments.lexers.data import JsonLexer
1113

1214
from cryptojwt.jwe import jwe
1315
from cryptojwt.jwk.hmac import SYMKey
@@ -16,10 +18,8 @@
1618
from cryptojwt.jwk.rsa import import_rsa_key
1719
from cryptojwt.jws import jws
1820
from cryptojwt.key_bundle import KeyBundle
21+
from cryptojwt.key_issuer import KeyIssuer
1922
from cryptojwt.key_jar import KeyJar
20-
from pygments import highlight
21-
from pygments.formatters.terminal import TerminalFormatter
22-
from pygments.lexers.data import JsonLexer
2323

2424
__author__ = 'roland'
2525

src/cryptojwt/tools/keyconv.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from typing import Optional
1010

1111
from cryptography.hazmat.primitives import serialization
12+
1213
from cryptojwt.jwk import JWK
1314
from cryptojwt.jwk.ec import ECKey
1415
from cryptojwt.jwk.ec import import_private_key_from_file

0 commit comments

Comments
 (0)