Skip to content

Commit

Permalink
Some small updates (celery#1486)
Browse files Browse the repository at this point in the history
* Some small updates

* Update QpidException super-call to Python 3 syntax.
  • Loading branch information
atombrella authored Jan 30, 2022
1 parent 3ec6dc0 commit 31a84d5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/userguide/simple.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ to produce and consume logging messages:
from kombu import Connection
class Logger(object):
class Logger:
def __init__(self, connection, queue_name='log_queue',
serializer='json', compression=None):
Expand Down
2 changes: 1 addition & 1 deletion kombu/asynchronous/aws/sqs/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def list_first(rs):
return rs[0] if len(rs) == 1 else None


class AsyncQueue():
class AsyncQueue:
"""Async SQS Queue."""

def __init__(self, connection=None, url=None, message_class=AsyncMessage):
Expand Down
2 changes: 1 addition & 1 deletion kombu/asynchronous/http/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Request:
auth_password (str): Password for HTTP authentication.
auth_mode (str): Type of HTTP authentication (``basic`` or ``digest``).
user_agent (str): Custom user agent for this request.
network_interace (str): Network interface to use for this request.
network_interface (str): Network interface to use for this request.
on_ready (Callable): Callback to be called when the response has been
received. Must accept single ``response`` argument.
on_stream (Callable): Optional callback to be called every time body
Expand Down
9 changes: 3 additions & 6 deletions kombu/asynchronous/semaphore.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@ class LaxBoundedSemaphore:
range even if released more times than it was acquired.
Example:
>>> from future import print_statement as printf
# ^ ignore: just fooling stupid pyflakes
>>> x = LaxBoundedSemaphore(2)
>>> x.acquire(printf, 'HELLO 1')
>>> x.acquire(print, 'HELLO 1')
HELLO 1
>>> x.acquire(printf, 'HELLO 2')
>>> x.acquire(print, 'HELLO 2')
HELLO 2
>>> x.acquire(printf, 'HELLO 3')
>>> x.acquire(print, 'HELLO 3')
>>> x._waiters # private, do not access directly
[print, ('HELLO 3',)]
Expand Down
2 changes: 1 addition & 1 deletion t/unit/transport/test_qpid.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class QpidException(Exception):
"""

def __init__(self, code=None, text=None):
super(Exception, self).__init__(self)
super().__init__(self)
self.code = code
self.text = text

Expand Down

0 comments on commit 31a84d5

Please sign in to comment.