Skip to content

Commit 9d27e48

Browse files
Upgrade isort to version 5
It's now pinned to its major version, so that a new major release won't break our CI again.
1 parent 83a3190 commit 9d27e48

19 files changed

+59
-52
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ imports (``isort``), do a static type analysis and run the project's tests:
145145
.. code-block:: bash
146146
147147
flake8 .
148-
isort -rc .
148+
isort .
149149
MYPYPATH=${PWD}/stubs mypy saltyrtc examples
150150
py.test
151151

RELEASING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Signing key: https://lgrahl.de/pub/pgp-key.txt
77

88
```bash
99
flake8 .
10-
isort -rc -c . || isort -rc -df
10+
isort -c . || isort -df
1111
rm -rf .mypy_cache && MYPYPATH=${PWD}/stubs mypy saltyrtc examples
1212
py.test
1313
```

examples/debug.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import asyncio
2-
import os
3-
import ssl # noqa
4-
import sys
51
from typing import Any # noqa
62
from typing import Coroutine # noqa
73
from typing import List # noqa
84
from typing import Optional
95

6+
import asyncio
107
import logbook.more
8+
import os
9+
import ssl # noqa
10+
import sys
1111

1212
import saltyrtc.server
1313
from saltyrtc.server.typing import ServerSecretPermanentKey # noqa

examples/restartable.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import asyncio
2-
import os
3-
import signal
4-
import ssl # noqa
5-
import sys
61
from typing import Any # noqa
72
from typing import Coroutine # noqa
83
from typing import List # noqa
94
from typing import Optional
105

6+
import asyncio
117
import logbook.more
8+
import os
9+
import signal
10+
import ssl # noqa
11+
import sys
1212

1313
import saltyrtc.server
1414
from saltyrtc.server.typing import ServerSecretPermanentKey # noqa

saltyrtc/server/__init__.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
"""
55
import itertools
66

7+
from . import (
8+
common,
9+
events,
10+
exception,
11+
message,
12+
protocol,
13+
server,
14+
task,
15+
util,
16+
)
717
from .common import * # noqa
818
from .events import * # noqa
919
from .exception import * # noqa
@@ -13,8 +23,6 @@
1323
from .task import * # noqa
1424
from .util import * # noqa
1525

16-
from . import common, events, exception, message, protocol, server, task, util
17-
1826
__all__ = tuple(itertools.chain(
1927
('bin', 'typing'),
2028
common.__all__,

saltyrtc/server/bin.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
"""
22
The command line interface for the SaltyRTC signalling server.
33
"""
4-
import asyncio
5-
import enum
6-
import os
7-
import signal
8-
import stat
94
from typing import Coroutine # noqa
105
from typing import List # noqa
116
from typing import Optional # noqa
127
from typing import Sequence # noqa
138
from typing import Any
149

10+
import asyncio
1511
import click
12+
import enum
1613
import libnacl.public
14+
import os
15+
import signal
16+
import stat
1717

1818
from . import (
1919
__version__ as _version,

saltyrtc/server/common.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
This package will be moved to `saltyrtc.common` as soon as a SaltyRTC
33
client is being written.
44
"""
5-
import enum
65
from typing import (
76
TYPE_CHECKING,
87
Any,
98
cast,
109
)
1110

11+
import enum
12+
1213
from .exception import MessageError
1314
from .typing import (
1415
Nonce,

saltyrtc/server/events.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import collections
2-
import enum
31
from typing import Dict # noqa
42
from typing import List
53

4+
import collections
5+
import enum
6+
67
from .typing import EventCallback
78

89
__all__ = (

saltyrtc/server/message.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import abc
2-
import binascii
3-
import io
4-
import struct
51
from typing import ClassVar # noqa
62
from typing import (
73
TYPE_CHECKING,
@@ -13,7 +9,11 @@
139
cast,
1410
)
1511

12+
import abc
13+
import binascii
14+
import io
1615
import libnacl
16+
import struct
1717
import umsgpack
1818

1919
from .common import (

saltyrtc/server/protocol.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import asyncio
2-
import os
3-
import struct
41
# noinspection PyUnresolvedReferences
52
from typing import Dict # noqa
63
from typing import Set # noqa
@@ -14,8 +11,11 @@
1411
cast,
1512
)
1613

14+
import asyncio
1715
import libnacl
1816
import libnacl.public
17+
import os
18+
import struct
1919
import websockets
2020

2121
from . import util

saltyrtc/server/server.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
import asyncio
2-
import binascii
3-
import functools
4-
import ssl
5-
from collections import OrderedDict
61
from typing import Awaitable # noqa
72
from typing import ClassVar # noqa
83
from typing import Dict # noqa
@@ -22,7 +17,12 @@
2217
cast,
2318
)
2419

20+
import asyncio
21+
import binascii
22+
import functools
23+
import ssl
2524
import websockets
25+
from collections import OrderedDict
2626
from websockets.typing import Subprotocol
2727

2828
from . import util

saltyrtc/server/task.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import asyncio
2-
import enum
3-
import functools
41
from typing import (
52
Any,
63
Callable,
@@ -10,6 +7,10 @@
107
Union,
118
)
129

10+
import asyncio
11+
import enum
12+
import functools
13+
1314
from . import util
1415
from .exception import (
1516
Disconnected,

saltyrtc/server/typing.py

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
if TYPE_CHECKING:
1818
# noinspection PyUnresolvedReferences
1919
import logbook # noqa
20+
2021
# noinspection PyUnresolvedReferences
2122
from .events import Event # noqa
2223

saltyrtc/server/util.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
This module provides utility functions for the SaltyRTC Signalling
33
Server.
44
"""
5-
import asyncio
6-
import binascii
7-
import logging
8-
import ssl
95
# noinspection PyUnresolvedReferences
106
from typing import Coroutine # noqa
117
from typing import (
@@ -19,8 +15,12 @@
1915
cast,
2016
)
2117

18+
import asyncio
19+
import binascii
2220
import libnacl
2321
import libnacl.public
22+
import logging
23+
import ssl
2424

2525
from .typing import (
2626
LogbookLevel,

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
import platform
44
import sys
5-
65
from setuptools import setup
76

87

@@ -54,7 +53,7 @@ def read(file):
5453
'pytest-cov>=2.5.1,<3',
5554
'pytest-mock>=1.10.0,<2',
5655
'flake8>=3.7.8',
57-
'isort>=4.3.21',
56+
'isort>=5,<6',
5857
'collective.checkdocs>=0.2',
5958
'Pygments>=2.2.0', # required by checkdocs
6059
'ordered-set>=3.0.1', # required by TestServer class

tests/conftest.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import asyncio
22
import functools
3+
import libnacl.public
4+
import logbook
5+
import ordered_set
36
import os
7+
import pytest
48
import socket
59
import ssl
610
import struct
711
import subprocess
812
import sys
9-
from contextlib import closing
10-
11-
import libnacl.public
12-
import logbook
13-
import ordered_set
14-
import pytest
1513
import umsgpack
1614
import websockets
15+
from contextlib import closing
1716

1817
from saltyrtc.server import (
1918
NONCE_FORMATTER,

tests/test_cli.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import binascii
22
import os
3+
import pytest
34
import signal
45
import stat
56
import subprocess
67

7-
import pytest
8-
98
from saltyrtc.server import (
109
Server,
1110
__version__ as _version,

tests/test_protocol.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
compliant to the SaltyRTC protocol.
44
"""
55
import asyncio
6-
76
import libnacl.public
87
import pytest
98
import websockets

tests/test_server.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"""
55
import asyncio
66
import collections
7-
87
import pytest
98

109
from saltyrtc.server import (

0 commit comments

Comments
 (0)