8000 Switch from import-order to isort · yyht/python-stdnum@6eadca1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6eadca1

Browse files
committed
Switch from import-order to isort
1 parent 9daa1b0 commit 6eadca1

File tree

17 files changed

+31
-18
lines changed

17 files changed

+31
-18
lines changed

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ ignore =
3636
W504 # we put the binary operator on the preceding line
3737
max-complexity = 15
3838
max-line-length = 120
39+
40+
[isort]
41+
lines_after_imports = 2
42+
multi_line_output = 4

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@
2323

2424
import os
2525
import sys
26-
from setuptools import setup, find_packages
26+
27+
from setuptools import find_packages, setup
2728

2829
import stdnum
2930

31+
3032
# fix permissions for sdist
3133
if 'sdist' in sys.argv:
3234
os.system('chmod -R a+rX .')

stdnum/__init__.py

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

4040
from stdnum.util import get_cc_module
4141

42+
4243
__all__ = ('get_cc_module', '__version__')
4344

4445
# the version number of the library

stdnum/bic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
from stdnum.exceptions import *
5353
from stdnum.util import clean
5454

55+
5556
_bic_re = re.compile(r'^[A-Z]{6}[0-9A-Z]{2}([0-9A-Z]{3})?$')
5657

5758

stdnum/cl/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
"""Collection of Chilean numbers."""
2222

2323
# provide vat and run as an alias
24-
from stdnum.cl import rut as vat # noqa: F401
25-
from stdnum.cl import rut as run # noqa: F401
24+
from stdnum.cl import rut as vat # noqa: F401, isort:skip
25+
from stdnum.cl import rut as run # noqa: F401, isort:skip

stdnum/co/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
"""Collection of Colombian numbers."""
2222

2323
# provide vat and rut as an alias
24-
from stdnum.co import nit as vat # noqa: F401
25-
from stdnum.co import nit as rut # noqa: F401
24+
from stdnum.co import nit as vat # noqa: F401, isort:skip
25+
from stdnum.co import nit as rut # noqa: F401, isort:skip

stdnum/eu/at_02.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from stdnum.iso7064 import mod_97_10
4343
from stdnum.util import clean
4444

45+
4546
# the valid characters we have
4647
_alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
4748

stdnum/iso6346.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444

4545
import re
4646

47-
from stdnum.exceptions import InvalidChecksum, InvalidFormat, InvalidLength, \
48-
ValidationError
47+
from stdnum.exceptions import *
4948
from stdnum.util import clean
5049

5150

stdnum/iso9362.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929

3030

3131
# We ensure that stdnum.bic is exposed in this module's place
32-
import stdnum.bic
32+
import stdnum.bic # isort:skip
3333
sys.modules[__name__] = stdnum.bic

stdnum/numdb.py

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

8888
from pkg_resources import resource_stream
8989

90+
9091
_line_re = re.compile(
9192
r'^(?P<indent> *)'
9293
r'(?P<ranges>([^-,\s]+(-[^-,\s]+)?)(,[^-,\s]+(-[^-,\s]+)?)*)\s*'

0 commit comments

Comments
 (0)
0