diff options
author | Omer Katz <omer.drow@gmail.com> | 2020-07-13 16:58:06 +0300 |
---|---|---|
committer | Omer Katz <omer.drow@gmail.com> | 2020-07-13 16:58:06 +0300 |
commit | 7a6e7cc45b9afe799770313a66c4211d1986ff30 (patch) | |
tree | 189c7fa2e7ca9835e14975093c12b7e5d3d8213b /kombu/pidbox.py | |
parent | 016f4accb634ebc3eb8fc66741f23552e5966ea7 (diff) | |
download | kombu-7a6e7cc45b9afe799770313a66c4211d1986ff30.tar.gz |
pyupgrade
Diffstat (limited to 'kombu/pidbox.py')
-rw-r--r-- | kombu/pidbox.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kombu/pidbox.py b/kombu/pidbox.py index 394ad2f1..25b43028 100644 --- a/kombu/pidbox.py +++ b/kombu/pidbox.py @@ -1,5 +1,4 @@ """Generic process mailbox.""" -from __future__ import absolute_import, unicode_literals import socket import warnings @@ -37,7 +36,7 @@ logger = get_logger(__name__) debug, error = logger.debug, logger.error -class Node(object): +class Node: """Mailbox node.""" #: hostname of the node. @@ -151,7 +150,7 @@ class Node(object): serializer=self.mailbox.serializer) -class Mailbox(object): +class Mailbox: """Process Mailbox.""" node_cls = Node @@ -236,7 +235,7 @@ class Mailbox(object): def get_reply_queue(self): oid = self.oid return Queue( - '%s.%s' % (oid, self.reply_exchange.name), + f'{oid}.{self.reply_exchange.name}', exchange=self.reply_exchange, routing_key=oid, durable=False, @@ -251,7 +250,7 @@ class Mailbox(object): def get_queue(self, hostname): return Queue( - '%s.%s.pidbox' % (hostname, self.namespace), + f'{hostname}.{self.namespace}.pidbox', exchange=self.exchange, durable=False, auto_delete=True, @@ -319,7 +318,7 @@ class Mailbox(object): if destination is not None and \ not isinstance(destination, (list, tuple)): raise ValueError( - 'destination must be a list/tuple not {0}'.format( + 'destination must be a list/tuple not {}'.format( type(destination))) if (pattern is not None and not isinstance(pattern, string_t) and matcher is not None and not isinstance(matcher, string_t)): |