Skip to content

Commit 6b429d9

Browse files
committed
Reorder the tests for E12
1 parent 9de61e1 commit 6b429d9

1 file changed

Lines changed: 111 additions & 105 deletions

File tree

testsuite/E12.py

Lines changed: 111 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
#: E122
55
print "E122", (
66
"dent")
7+
#: E123
8+
my_list = [
9+
1, 2, 3,
10+
4, 5, 6,
11+
]
712
#: E124
813
print "E124", ("visual",
914
"indent_two"
@@ -37,6 +42,66 @@
3742
#:
3843

3944

45+
#: E121
46+
my_list = [
47+
1, 2, 3,
48+
4, 5, 6,
49+
]
50+
#: E121
51+
result = {
52+
'key1': 'value',
53+
'key2': 'value',
54+
}
55+
#: E121
56+
rv.update(dict.fromkeys((
57+
'qualif_nr', 'reasonComment_en', 'reasonComment_fr',
58+
'reasonComment_de', 'reasonComment_it'),
59+
'?'),
60+
"foo")
61+
#: E121
62+
abricot = 3 + \
63+
4 + \
64+
5 + 6
65+
#: E121
66+
print "hello", (
67+
68+
"there",
69+
# "john",
70+
"dude")
71+
#: E121
72+
part = set_mimetype((
73+
a.get('mime_type', 'text')),
74+
'default')
75+
#:
76+
77+
78+
#: E122
79+
if True:
80+
result = some_function_that_takes_arguments(
81+
'a', 'b', 'c',
82+
'd', 'e', 'f',
83+
)
84+
#: E122
85+
if some_very_very_very_long_variable_name or var \
86+
or another_very_long_variable_name:
87+
raise Exception()
88+
#: E122
89+
if some_very_very_very_long_variable_name or var[0] \
90+
or another_very_long_variable_name:
91+
raise Exception()
92+
#: E122
93+
if True:
94+
if some_very_very_very_long_variable_name or var \
95+
or another_very_long_variable_name:
96+
raise Exception()
97+
#: E122
98+
if True:
99+
if some_very_very_very_long_variable_name or var[0] \
100+
or another_very_long_variable_name:
101+
raise Exception()
102+
#:
103+
104+
40105
#: E123 W291
41106
print "E123", (
42107
"bad", "hanging", "close"
@@ -51,11 +116,6 @@
51116
]
52117
}
53118
#: E123
54-
my_list = [
55-
1, 2, 3,
56-
4, 5, 6,
57-
]
58-
#: E123
59119
result = some_function_that_takes_arguments(
60120
'a', 'b', 'c',
61121
'd', 'e', 'f',
@@ -72,41 +132,32 @@
72132
result = some_function_that_takes_arguments('a', 'b', 'c',
73133
'd', 'e', 'f',
74134
)
75-
#: E121
76-
my_list = [
77-
1, 2, 3,
78-
4, 5, 6,
79-
]
80-
#: E126
81-
my_list = [
82-
1, 2, 3,
83-
4, 5, 6,
84-
]
85-
#: E122
86-
if True:
87-
result = some_function_that_takes_arguments(
88-
'a', 'b', 'c',
89-
'd', 'e', 'f',
135+
#: E124
136+
fooff(aaaa,
137+
cca(
138+
vvv,
139+
dadd
140+
), fff,
90141
)
91-
#: E121
92-
result = {
93-
'key1': 'value',
94-
'key2': 'value',
95-
}
96-
#: E121
97-
rv.update(dict.fromkeys((
98-
'qualif_nr', 'reasonComment_en', 'reasonComment_fr',
99-
'reasonComment_de', 'reasonComment_it'),
100-
'?'),
101-
"foo")
102-
#: E121
103-
abricot = 3 + \
104-
4 + \
105-
5 + 6
106-
#: E126
107-
abris = 3 + \
108-
4 + \
109-
5 + 6
142+
#: E124
143+
fooff(aaaa,
144+
ccaaa(
145+
vvv,
146+
dadd
147+
),
148+
fff,
149+
)
150+
#: E124
151+
d = dict('foo',
152+
help="exclude files or directories which match these "
153+
"comma separated patterns (default: %s)" % DEFAULT_EXCLUDE
154+
)
155+
#: E124 E128
156+
if line_removed:
157+
self.event(cr, uid,
158+
name="Removing the option for contract",
159+
description="contract line has been removed",
160+
)
110161
#:
111162

112163

@@ -138,6 +189,15 @@ def qualify_by_address(
138189
#:
139190

140191

192+
#: E126
193+
my_list = [
194+
1, 2, 3,
195+
4, 5, 6,
196+
]
197+
#: E126
198+
abris = 3 + \
199+
4 + \
200+
5 + 6
141201
#: E126
142202
fixed = re.sub(r'\t+', ' ', target[c::-1], 1)[::-1] + \
143203
target[c + 1:]
@@ -168,6 +228,18 @@ def qualify_by_address(
168228
) or
169229
y == 4):
170230
pass
231+
#: E126
232+
troublesome_hash = {
233+
"hash": "value",
234+
"long": "the quick brown fox jumps over the lazy dog before doing a "
235+
"somersault",
236+
}
237+
#: E126
238+
# probably not easily fixed, without using 'ast'
239+
troublesome_hash_ii = {
240+
"long key that tends to happen more when you're indented":
241+
"stringwithalongtoken you don't want to break",
242+
}
171243
#:
172244

173245

@@ -188,43 +260,6 @@ def qualify_by_address(self, cr, uid, ids, context=None,
188260
#:
189261

190262

191-
#: E121
192-
print "hello", (
193-
194-
"there",
195-
# "john",
196-
"dude")
197-
#: E121
198-
part = set_mimetype((
199-
a.get('mime_type', 'text')),
200-
'default')
201-
#: E124
202-
fooff(aaaa,
203-
cca(
204-
vvv,
205-
dadd
206-
), fff,
207-
)
208-
#: E124
209-
fooff(aaaa,
210-
ccaaa(
211-
vvv,
212-
dadd
213-
),
214-
fff,
215-
)
216-
#: E126
217-
troublesome_hash = {
218-
"hash": "value",
219-
"long": "the quick brown fox jumps over the lazy dog before doing a "
220-
"somersault",
221-
}
222-
#: E126
223-
# probably not easily fixed, without using 'ast'
224-
troublesome_hash_ii = {
225-
"long key that tends to happen more when you're indented":
226-
"stringwithalongtoken you don't want to break",
227-
}
228263
#: E128
229264
foo(1, 2, 3,
230265
4, 5, 6)
@@ -264,17 +299,6 @@ def qualify_by_address(self, cr, uid, ids, context=None,
264299
#: E127
265300
foo(1, 2, 3,
266301
4, 5, 6)
267-
#: E124
268-
d = dict('foo',
269-
help="exclude files or directories which match these "
270-
"comma separated patterns (default: %s)" % DEFAULT_EXCLUDE
271-
)
272-
#: E124 E128
273-
if line_removed:
274-
self.event(cr, uid,
275-
name="Removing the option for contract",
276-
description="contract line has been removed",
277-
)
278302
#: E128
279303
if line_removed:
280304
self.event(cr, uid,
@@ -302,22 +326,4 @@ def qualify_by_address(self, cr, uid, ids, context=None,
302326
rv.update(d=('a' + 'b', 'c'),
303327
e=42, f=(42
304328
+ 42))
305-
#: E122
306-
if some_very_very_very_long_variable_name or var \
307-
or another_very_long_variable_name:
308-
raise Exception()
309-
#: E122
310-
if some_very_very_very_long_variable_name or var[0] \
311-
or another_very_long_variable_name:
312-
raise Exception()
313-
#: E122
314-
if True:
315-
if some_very_very_very_long_variable_name or var \
316-
or another_very_long_variable_name:
317-
raise Exception()
318-
#: E122
319-
if True:
320-
if some_very_very_very_long_variable_name or var[0] \
321-
or another_very_long_variable_name:
322-
raise Exception()
323329
#:

0 commit comments

Comments
 (0)