From ebd8f54e1ac3992d9340b92efa3e3c96c6943b6c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 7 Dec 2024 01:32:18 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- t/integration/test_py_amqp.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/t/integration/test_py_amqp.py b/t/integration/test_py_amqp.py index f66d3cd55..87ba6e3bc 100644 --- a/t/integration/test_py_amqp.py +++ b/t/integration/test_py_amqp.py @@ -4,20 +4,13 @@ import uuid import pytest - -import kombu from amqp.exceptions import NotFound +import kombu from kombu.connection import ConnectionPool -from .common import ( - BaseExchangeTypes, - BaseFailover, - BaseMessage, - BasePriority, - BaseTimeToLive, - BasicFunctionality, -) +from .common import (BaseExchangeTypes, BaseFailover, BaseMessage, + BasePriority, BaseTimeToLive, BasicFunctionality) def get_connection(hostname, port, vhost): @@ -115,7 +108,7 @@ def test_publish_confirm_does_not_block(self, confirm_publish_connection): In case an exception occurs while the connection is in use, the pool should close the exception. In case the connection is not closed before releasing it - back to the pool, the connection would remain in an unsuable state, causing + back to the pool, the connection would remain in an unusable state, causing causing the next publish call to time out or block forever in case no timeout is specified. """ @@ -125,7 +118,7 @@ def test_publish_confirm_does_not_block(self, confirm_publish_connection): with pool.acquire(block=True) as connection: producer = kombu.Producer(connection) queue = kombu.Queue( - "test-queue-{}".format(uuid.uuid4()), channel=connection + f"test-queue-{uuid.uuid4()}", channel=connection ) queue.declare() producer.publish( @@ -144,7 +137,7 @@ def test_publish_confirm_does_not_block(self, confirm_publish_connection): assert not connection.connected producer = kombu.Producer(connection) queue = kombu.Queue( - "test-queue-{}".format(uuid.uuid4()), channel=connection + f"test-queue-{uuid.uuid4()}", channel=connection ) queue.declare() # In case the connection is broken, we should get a Timeout here