summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmer Katz <omer.drow@gmail.com>2020-08-30 19:19:31 +0300
committerAsif Saif Uddin <auvipy@gmail.com>2020-08-31 14:05:09 +0600
commit7a209e31bd9cfd1bf15c6ab959ffc4efa460eef0 (patch)
tree545118c3187990a11ce3c56ad5a9f9b29633ec2f
parentde9b2bad9723ffa4fed2b9e2a73099f28d699ecb (diff)
downloadpy-amqp-7a209e31bd9cfd1bf15c6ab959ffc4efa460eef0.tar.gz
isort.
-rw-r--r--amqp/__init__.py44
-rw-r--r--amqp/transport.py2
-rw-r--r--t/integration/test_integration.py2
-rw-r--r--t/unit/test_abstract_channel.py5
-rw-r--r--t/unit/test_connection.py2
-rw-r--r--t/unit/test_serialization.py2
-rw-r--r--t/unit/test_transport.py2
7 files changed, 19 insertions, 40 deletions
diff --git a/amqp/__init__.py b/amqp/__init__.py
index db877fa..4a35f09 100644
--- a/amqp/__init__.py
+++ b/amqp/__init__.py
@@ -3,7 +3,6 @@
from __future__ import absolute_import, unicode_literals
import re
-
from collections import namedtuple
__version__ = '5.0.0a1'
@@ -29,38 +28,19 @@ del(_temp)
del(re)
from .basic_message import Message # noqa
-from .channel import Channel # noqa
+from .channel import Channel # noqa
from .connection import Connection # noqa
-from .exceptions import ( # noqa
- AMQPError,
- ConnectionError,
- RecoverableConnectionError,
- IrrecoverableConnectionError,
- ChannelError,
- RecoverableChannelError,
- IrrecoverableChannelError,
- ConsumerCancelled,
- ContentTooLarge,
- NoConsumers,
- ConnectionForced,
- InvalidPath,
- AccessRefused,
- NotFound,
- ResourceLocked,
- PreconditionFailed,
- FrameError,
- FrameSyntaxError,
- InvalidCommand,
- ChannelNotOpen,
- UnexpectedFrame,
- ResourceError,
- NotAllowed,
- AMQPNotImplementedError,
- InternalError,
- error_for_code,
-)
-from .utils import promise # noqa
-
+from .exceptions import (AccessRefused, AMQPError, # noqa
+ AMQPNotImplementedError, ChannelError, ChannelNotOpen,
+ ConnectionError, ConnectionForced, ConsumerCancelled,
+ ContentTooLarge, FrameError, FrameSyntaxError,
+ InternalError, InvalidCommand, InvalidPath,
+ IrrecoverableChannelError,
+ IrrecoverableConnectionError, NoConsumers, NotAllowed,
+ NotFound, PreconditionFailed, RecoverableChannelError,
+ RecoverableConnectionError, ResourceError,
+ ResourceLocked, UnexpectedFrame, error_for_code)
+from .utils import promise # noqa
__all__ = (
'Connection',
diff --git a/amqp/transport.py b/amqp/transport.py
index 10abbad..afd5cd8 100644
--- a/amqp/transport.py
+++ b/amqp/transport.py
@@ -1,8 +1,8 @@
"""Transport implementation."""
# Copyright (C) 2009 Barry Pederson <bp@barryp.org>
-import os
import errno
+import os
import re
import socket
import ssl
diff --git a/t/integration/test_integration.py b/t/integration/test_integration.py
index 3003d86..89f787f 100644
--- a/t/integration/test_integration.py
+++ b/t/integration/test_integration.py
@@ -5,7 +5,7 @@ import pytest
# python 3.5 does not support assert_called()
# TODO: After dropping support of python3.5
# unittest.mock can be used instead of case
-from case import Mock, ANY, call, patch
+from case import ANY, Mock, call, patch
import amqp
from amqp import Channel, Connection, Message, sasl, spec
diff --git a/t/unit/test_abstract_channel.py b/t/unit/test_abstract_channel.py
index 0034121..4994b40 100644
--- a/t/unit/test_abstract_channel.py
+++ b/t/unit/test_abstract_channel.py
@@ -4,9 +4,8 @@ import pytest
from vine import promise
from amqp import spec
-from amqp.abstract_channel import (
- AbstractChannel, IGNORED_METHOD_DURING_CHANNEL_CLOSE
-)
+from amqp.abstract_channel import (IGNORED_METHOD_DURING_CHANNEL_CLOSE,
+ AbstractChannel)
from amqp.exceptions import AMQPNotImplementedError, RecoverableConnectionError
from amqp.serialization import dumps
diff --git a/t/unit/test_connection.py b/t/unit/test_connection.py
index 7187b54..e59d19c 100644
--- a/t/unit/test_connection.py
+++ b/t/unit/test_connection.py
@@ -5,7 +5,7 @@ import pytest
# python 3.5 does not support assert_called()
# TODO: After dropping support of python3.5
# unittest.mock can be used instead of case
-from case import Mock, call, patch, ContextMock
+from case import ContextMock, Mock, call, patch
from amqp import Connection, spec
from amqp.connection import SSLError
diff --git a/t/unit/test_serialization.py b/t/unit/test_serialization.py
index 8d5ec1c..8bccc1d 100644
--- a/t/unit/test_serialization.py
+++ b/t/unit/test_serialization.py
@@ -1,7 +1,7 @@
+import pickle
from datetime import datetime
from decimal import Decimal
from math import ceil
-import pickle
from struct import pack
import pytest
diff --git a/t/unit/test_transport.py b/t/unit/test_transport.py
index 09e341c..504454f 100644
--- a/t/unit/test_transport.py
+++ b/t/unit/test_transport.py
@@ -1,7 +1,7 @@
import errno
+import os
import socket
import struct
-import os
from struct import pack
from unittest.mock import ANY, MagicMock, Mock, call, patch