mirror of
https://github.com/django/django.git
synced 2025-12-15 21:45:20 +00:00
PEP8 cleanup
Signed-off-by: Jason Myers <jason@jasonamyers.com>
This commit is contained in:
parent
0fdb692c6c
commit
7a61c68c50
128 changed files with 739 additions and 206 deletions
|
|
@ -23,9 +23,11 @@ else:
|
|||
def garbage_collect():
|
||||
gc.collect()
|
||||
|
||||
|
||||
def receiver_1_arg(val, **kwargs):
|
||||
return val
|
||||
|
||||
|
||||
class Callable(object):
|
||||
def __call__(self, val, **kwargs):
|
||||
return val
|
||||
|
|
@ -116,10 +118,10 @@ class DispatcherTests(unittest.TestCase):
|
|||
def uid_based_receiver_2(**kwargs):
|
||||
pass
|
||||
|
||||
a_signal.connect(uid_based_receiver_1, dispatch_uid = "uid")
|
||||
a_signal.connect(uid_based_receiver_2, dispatch_uid = "uid")
|
||||
a_signal.connect(uid_based_receiver_1, dispatch_uid="uid")
|
||||
a_signal.connect(uid_based_receiver_2, dispatch_uid="uid")
|
||||
self.assertEqual(len(a_signal.receivers), 1)
|
||||
a_signal.disconnect(dispatch_uid = "uid")
|
||||
a_signal.disconnect(dispatch_uid="uid")
|
||||
self._testIsClean(a_signal)
|
||||
|
||||
def testRobust(self):
|
||||
|
|
|
|||
|
|
@ -3,17 +3,21 @@ import unittest
|
|||
from django.dispatch.saferef import safeRef
|
||||
from django.utils.six.moves import xrange
|
||||
|
||||
|
||||
class Test1(object):
|
||||
def x(self):
|
||||
pass
|
||||
|
||||
|
||||
def test2(obj):
|
||||
pass
|
||||
|
||||
|
||||
class Test2(object):
|
||||
def __call__(self, obj):
|
||||
pass
|
||||
|
||||
|
||||
class SaferefTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
ts = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue