Skip to content

Commit f941fdc

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 74e4fc0 commit f941fdc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ def assert_raises_errno(errno):
159159
try:
160160
yield
161161
except zmq.ZMQError as e:
162-
assert (
163-
e.errno == errno
164-
), f"wrong error raised, expected {zmq.ZMQError(errno)} got {zmq.ZMQError(e.errno)}"
162+
assert e.errno == errno, (
163+
f"wrong error raised, expected {zmq.ZMQError(errno)} got {zmq.ZMQError(e.errno)}"
164+
)
165165
else:
166166
pytest.fail(f"Expected {zmq.ZMQError(errno)}, no error raised")
167167

zmq/eventloop/_deprecated.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ def install():
199199
# check if tornado's IOLoop is already initialized to something other
200200
# than the pyzmq IOLoop instance:
201201
assert (
202-
(not ioloop.IOLoop.initialized())
203-
or ioloop.IOLoop.instance() is IOLoop.instance()
204-
), "tornado IOLoop already initialized"
202+
not ioloop.IOLoop.initialized()
203+
) or ioloop.IOLoop.instance() is IOLoop.instance(), (
204+
"tornado IOLoop already initialized"
205+
)
205206

206207
if tornado_version >= (3,):
207208
# tornado 3 has an official API for registering new defaults, yay!

0 commit comments

Comments
 (0)