Skip to content

Commit 7a27d8a

Browse files
committed
Cosmetics
1 parent 84865a3 commit 7a27d8a

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

celery/datastructures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def __getattr__(self, k):
215215
return self[k]
216216
except KeyError:
217217
raise AttributeError(
218-
"{0!r} object has no attribute {1!r}".format(
218+
'{0!r} object has no attribute {1!r}'.format(
219219
type(self).__name__, k))
220220

221221
def __setattr__(self, key, value):

celery/tests/concurrency/test_eventlet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def tearDown(self):
4141
class test_aaa_eventlet_patch(EventletCase):
4242

4343
def test_aaa_is_patched(self):
44-
raise SkipTest("side effects")
44+
raise SkipTest('side effects')
4545
monkey_patched = []
4646
prev_monkey_patch = self.eventlet.monkey_patch
4747
self.eventlet.monkey_patch = lambda: monkey_patched.append(True)

celery/utils/dispatch/saferef.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ def safe_ref(target, on_delete=None): # pragma: no cover
2323
goes out of scope with the reference object, (either a
2424
:class:`weakref.ref` or a :class:`BoundMethodWeakref`) as argument.
2525
"""
26-
if getattr(target, "im_self", None) is not None:
26+
if getattr(target, 'im_self', None) is not None:
2727
# Turn a bound method into a BoundMethodWeakref instance.
2828
# Keep track of these instances for lookup by disconnect().
2929
assert hasattr(target, 'im_func'), \
30-
"""safe_ref target {0!r} has im_self, but no im_func, " \
31-
"don't know how to create reference""".format(target)
30+
"""safe_ref target {0!r} has im_self, but no im_func: \
31+
don't know how to create reference""".format(target)
3232
return get_bound_method_weakref(target=target,
3333
on_delete=on_delete)
3434
if callable(on_delete):
@@ -142,8 +142,8 @@ def remove(weak, self=self):
142142
try:
143143
traceback.print_exc()
144144
except AttributeError:
145-
print("Exception during saferef {0} cleanup function "
146-
"{1}: {2}".format(self, function, exc))
145+
print('Exception during saferef {0} cleanup function '
146+
'{1}: {2}'.format(self, function, exc))
147147

148148
self.deletion_methods = [on_delete]
149149
self.key = self.calculate_key(target)
@@ -163,7 +163,7 @@ def calculate_key(cls, target):
163163

164164
def __str__(self):
165165
"""Give a friendly representation of the object"""
166-
return """{0}( {1}.{2} )""".format(
166+
return '{0}( {1}.{2} )'.format(
167167
type(self).__name__,
168168
self.self_name,
169169
self.func_name,
@@ -212,7 +212,7 @@ class BoundNonDescriptorMethodWeakref(BoundMethodWeakref): # pragma: no cover
212212
... pass
213213
214214
>>> def foo(self):
215-
... return "foo"
215+
... return 'foo'
216216
>>> A.bar = foo
217217
218218
But this shouldn't be a common use case. So, on platforms where methods

celery/utils/timeutils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252

5353

5454
class LocalTimezone(tzinfo):
55-
"""
56-
Local time implementation taken from Python's docs.
55+
"""Local time implementation taken from Python's docs.
5756
5857
Used only when pytz isn't available, and most likely inaccurate. If you're
5958
having trouble with this class, don't waste your time, just install pytz.
@@ -71,7 +70,7 @@ def __init__(self):
7170
tzinfo.__init__(self)
7271

7372
def __repr__(self):
74-
return "<LocalTimezone>"
73+
return '<LocalTimezone>'
7574

7675
def utcoffset(self, dt):
7776
if self._isdst(dt):

0 commit comments

Comments
 (0)