Skip to content

Commit 452a32b

Browse files
author
Scott Sanderson
committed
MAINT: Add isort.
1 parent 0eb0fde commit 452a32b

File tree

7 files changed

+21
-7
lines changed

7 files changed

+21
-7
lines changed

.isort.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[settings]
2+
default_section=THIRDPARTY
3+
include_trailing_comma=True
4+
known_first_party=interface
5+
line_length=90
6+
multi_line_output=3
7+
force_sort_within_sections=True
8+
order_by_type=False
9+
combine_as_imports=True

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ repos:
1717
rev: 3.7.7
1818
hooks:
1919
- id: flake8
20+
21+
- repo: https://github.com/pre-commit/mirrors-isort
22+
rev: v4.3.16
23+
hooks:
24+
- id: isort

interface/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from .interface import implements, InvalidImplementation, Interface
21
from .default import default
2+
from .interface import implements, Interface, InvalidImplementation
33

44
__all__ = [
55
'default',

interface/functional.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"""
66
from collections import deque
77
from operator import itemgetter
8+
89
from .compat import viewkeys
910

1011

interface/tests/test_interface.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import pytest
21
from textwrap import dedent
32

3+
import pytest
4+
45
from ..compat import PY3, wraps
5-
from ..interface import implements, InvalidImplementation, Interface, default
66
from ..default import UnsafeDefault
7-
7+
from ..interface import default, implements, Interface, InvalidImplementation
88

99
py3_only = pytest.mark.skipif(not PY3, reason="Python 3 Only")
1010

interface/tests/test_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
from ..compat import unwrap, wraps
12
from ..utils import is_a, unique
23

3-
from ..compat import wraps, unwrap
4-
54

65
def test_unique():
76
assert list(unique(iter([1, 3, 1, 2, 3]))) == [1, 3, 2]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
from setuptools import setup, find_packages
2+
from setuptools import find_packages, setup
33

44
long_description = ''
55

0 commit comments

Comments
 (0)