mirror of https://github.com/django/django.git
Fixed E225 pep8 warnings.
This commit is contained in:
parent
51d2e1fb23
commit
ae48d77ef8
|
@ -4,7 +4,7 @@ install-script = scripts/rpm-install.sh
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
exclude=./django/utils/dictconfig.py,./django/contrib/comments/*,./django/utils/unittest.py,./tests/comment_tests/*,./django/test/_doctest.py
|
exclude=./django/utils/dictconfig.py,./django/contrib/comments/*,./django/utils/unittest.py,./tests/comment_tests/*,./django/test/_doctest.py
|
||||||
ignore=E124,E125,E127,E128,E225,E226,E241,E251,E302,E501,E203,E231,E261,E301,F401,F403,W601
|
ignore=E124,E125,E127,E128,E226,E241,E251,E302,E501,E203,E231,E261,E301,F401,F403,W601
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
license-file = LICENSE
|
license-file = LICENSE
|
||||||
|
|
|
@ -57,8 +57,8 @@ class DistinctOnTests(TestCase):
|
||||||
# Does combining querysets work?
|
# Does combining querysets work?
|
||||||
(
|
(
|
||||||
(Celebrity.objects.filter(fan__in=[self.fan1, self.fan2]).
|
(Celebrity.objects.filter(fan__in=[self.fan1, self.fan2]).
|
||||||
distinct('name').order_by('name')
|
distinct('name').order_by('name') |
|
||||||
|Celebrity.objects.filter(fan__in=[self.fan3]).
|
Celebrity.objects.filter(fan__in=[self.fan3]).
|
||||||
distinct('name').order_by('name')),
|
distinct('name').order_by('name')),
|
||||||
['<Celebrity: c1>', '<Celebrity: c2>'],
|
['<Celebrity: c1>', '<Celebrity: c2>'],
|
||||||
),
|
),
|
||||||
|
|
|
@ -340,7 +340,10 @@ class FormsWidgetTestCase(TestCase):
|
||||||
</select>""")
|
</select>""")
|
||||||
|
|
||||||
# Choices can be nested one level in order to create HTML optgroups:
|
# Choices can be nested one level in order to create HTML optgroups:
|
||||||
w.choices=(('outer1', 'Outer 1'), ('Group "1"', (('inner1', 'Inner 1'), ('inner2', 'Inner 2'))))
|
w.choices = (
|
||||||
|
('outer1', 'Outer 1'),
|
||||||
|
('Group "1"', (('inner1', 'Inner 1'), ('inner2', 'Inner 2'))),
|
||||||
|
)
|
||||||
self.assertHTMLEqual(w.render('nestchoice', None), """<select name="nestchoice">
|
self.assertHTMLEqual(w.render('nestchoice', None), """<select name="nestchoice">
|
||||||
<option value="outer1">Outer 1</option>
|
<option value="outer1">Outer 1</option>
|
||||||
<optgroup label="Group "1"">
|
<optgroup label="Group "1"">
|
||||||
|
@ -706,7 +709,11 @@ beatle J R Ringo False""")
|
||||||
def test_nested_choices(self):
|
def test_nested_choices(self):
|
||||||
# Choices can be nested for radio buttons:
|
# Choices can be nested for radio buttons:
|
||||||
w = RadioSelect()
|
w = RadioSelect()
|
||||||
w.choices=(('unknown', 'Unknown'), ('Audio', (('vinyl', 'Vinyl'), ('cd', 'CD'))), ('Video', (('vhs', 'VHS'), ('dvd', 'DVD'))))
|
w.choices = (
|
||||||
|
('unknown', 'Unknown'),
|
||||||
|
('Audio', (('vinyl', 'Vinyl'), ('cd', 'CD'))),
|
||||||
|
('Video', (('vhs', 'VHS'), ('dvd', 'DVD'))),
|
||||||
|
)
|
||||||
self.assertHTMLEqual(w.render('nestchoice', 'dvd', attrs={'id':'media'}), """<ul id="media">
|
self.assertHTMLEqual(w.render('nestchoice', 'dvd', attrs={'id':'media'}), """<ul id="media">
|
||||||
<li><label for="media_0"><input id="media_0" name="nestchoice" type="radio" value="unknown" /> Unknown</label></li>
|
<li><label for="media_0"><input id="media_0" name="nestchoice" type="radio" value="unknown" /> Unknown</label></li>
|
||||||
<li>Audio<ul id="media_1">
|
<li>Audio<ul id="media_1">
|
||||||
|
@ -721,7 +728,11 @@ beatle J R Ringo False""")
|
||||||
|
|
||||||
# Choices can be nested for checkboxes:
|
# Choices can be nested for checkboxes:
|
||||||
w = CheckboxSelectMultiple()
|
w = CheckboxSelectMultiple()
|
||||||
w.choices=(('unknown', 'Unknown'), ('Audio', (('vinyl', 'Vinyl'), ('cd', 'CD'))), ('Video', (('vhs', 'VHS'), ('dvd', 'DVD'))))
|
w.choices = (
|
||||||
|
('unknown', 'Unknown'),
|
||||||
|
('Audio', (('vinyl', 'Vinyl'), ('cd', 'CD'))),
|
||||||
|
('Video', (('vhs', 'VHS'), ('dvd', 'DVD'))),
|
||||||
|
)
|
||||||
self.assertHTMLEqual(w.render('nestchoice', ('vinyl', 'dvd'), attrs={'id':'media'}), """<ul id="media">
|
self.assertHTMLEqual(w.render('nestchoice', ('vinyl', 'dvd'), attrs={'id':'media'}), """<ul id="media">
|
||||||
<li><label for="media_0"><input id="media_0" name="nestchoice" type="checkbox" value="unknown" /> Unknown</label></li>
|
<li><label for="media_0"><input id="media_0" name="nestchoice" type="checkbox" value="unknown" /> Unknown</label></li>
|
||||||
<li>Audio<ul id="media_1">
|
<li>Audio<ul id="media_1">
|
||||||
|
|
Loading…
Reference in New Issue