Skip to content

Commit ef36170

Browse files
committed
Merged, blackend and isorted.
Added isort.cfg
2 parents 60e2b17 + cd9ad26 commit ef36170

File tree

14 files changed

+22
-30
lines changed

14 files changed

+22
-30
lines changed

.isort.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
[settings]
22
force_single_line = 1
33
known_first_party = cryptojwt
4-
known_third_party = pytest
5-
default_section = THIRDPARTY

.travis.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sudo: false
22
language: python
3+
cache: pip
34
python:
45
- 3.6
56
- 3.7
@@ -8,18 +9,16 @@ python:
89
addons:
910
apt:
1011
packages:
11-
-
12+
-
1213
install:
1314
- pip install codecov
14-
- pip install tox
15-
- pip install tox-travis
16-
- pip install isort
17-
- pip install black
15+
- pip install tox tox-travis
16+
- pip install isort black
1817
script:
19-
- isort --check --recursive src tests
20-
- black --check src tests
2118
- codecov --version
2219
- tox
20+
- isort --check -sl -p cryptojwt -rc src tests
21+
- black --check src tests
2322
after_success:
2423
- codecov
2524
notifications:

setup.py

Lines changed: 2 additions & 2 deletions
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', 'isort', 'black']
29+
tests_requires = ['responses', 'pytest', 'isort>=5.0.2', 'black']
3030

3131
setup(
3232
name="cryptojwt",
@@ -53,7 +53,7 @@
5353
extras_require={
5454
'testing': tests_requires,
5555
'docs': ['Sphinx', 'sphinx-autobuild', 'alabaster'],
56-
'quality': ['isort'],
56+
'quality': ['isort>=5.0.2', 'black'],
5757
},
5858
scripts=glob.glob('script/*.py'),
5959
entry_points={

src/cryptojwt/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
from .utils import split_token
1616

1717
try:
18-
from builtins import zip
19-
from builtins import hex
20-
from builtins import str
18+
from builtins import hex, str, zip
2119
except ImportError:
2220
pass
2321

src/cryptojwt/jws/jws.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
from .utils import alg2keytype
2424

2525
try:
26-
from builtins import str
27-
from builtins import object
26+
from builtins import object, str
2827
except ImportError:
2928
pass
3029

src/cryptojwt/jws/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# import struct
2-
32
from cryptography.hazmat.primitives import hashes
43
from cryptography.hazmat.primitives.asymmetric import padding
54

src/cryptojwt/tools/jwtpeek.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python3
22

33
# Thanks to @rohe Roland Hedberg for most of the lines in this script :).
4-
54
import argparse
65
import json
76
import os

src/cryptojwt/tools/keyconv.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python3
22

33
"""Convert JWK from/to PEM and other formats"""
4-
54
import argparse
65
import json
76
from binascii import hexlify

src/cryptojwt/tools/keygen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python3
22

33
"""JSON Web Key (JWK) Generator"""
4-
54
import argparse
65
import json
76
import os

tests/test_02_jwk.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python3
2-
32
from __future__ import print_function
43

54
import base64

0 commit comments

Comments
 (0)