Skip to content

Commit

Permalink
lint: fix line length
Browse files Browse the repository at this point in the history
  • Loading branch information
Lancetnik committed Jul 12, 2024
1 parent c0f4263 commit 4e93dc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion aio_pika/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ async def publish(
)

if self.channel.is_closed:
raise aiormq.exceptions.ChannelInvalidStateError("%r closed" % self.channel)
raise aiormq.exceptions.ChannelInvalidStateError(
"%r closed" % self.channel,
)

channel = await self.channel.get_underlay_channel()
return await channel.basic_publish(
Expand Down
6 changes: 5 additions & 1 deletion tests/test_amqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,11 @@ async def test_simple_publish_with_closed_channel(

with pytest.raises(aiormq.exceptions.ChannelInvalidStateError):
await exchange.publish(
Message(body, content_type="text/plain", headers={"foo": "bar"}),
Message(
body,
content_type="text/plain",
headers={"foo": "bar"},
),
routing_key,
)

Expand Down

0 comments on commit 4e93dc4

Please sign in to comment.