1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
|
#: E121
print "E121", (
"dent")
#: E122
print "E122", (
"dent")
#: E124
print "E124", ("visual",
"indent_two"
)
#: E124
print "E124", ("visual",
"indent_five"
)
#: E124
a = (123,
)
#: E125
if (row < 0 or self.moduleCount <= row or
col < 0 or self.moduleCount <= col):
raise Exception("%s,%s - %s" % (row, col, self.moduleCount))
#: E126
print "E126", (
"dent")
#: E126
print "E126", (
"dent")
#: E127
print "E127", ("over-",
"over-indent")
#: E128
print "E128", ("visual",
"hanging")
#: E128
print "E128", ("under-",
"under-indent")
#:
#: E123 W291
print "E123", (
"bad", "hanging", "close"
)
#
#: E123
result = {
'foo': [
'bar', {
'baz': 'frop',
}
]
}
#: E121
result = {
'key1': 'value',
'key2': 'value',
}
#: E121
rv.update(dict.fromkeys((
'qualif_nr', 'reasonComment_en', 'reasonComment_fr',
'reasonComment_de', 'reasonComment_it'),
'?'),
"foo")
#:
#: E125
if foo is None and bar is "frop" and \
blah == 'yeah':
blah = 'yeahnah'
#: E125
# Further indentation required as indentation is not distinguishable
def long_function_name(
var_one, var_two, var_three,
var_four):
print(var_one)
#
#: E125
def qualify_by_address(
self, cr, uid, ids, context=None,
params_to_check=frozenset(QUALIF_BY_ADDRESS_PARAM)):
""" This gets called by the web server """
#: E125
if (a == 2 or
b == "abc def ghi"
"jkl mno"):
return True
#:
#: E126
fixed = re.sub(r'\t+', ' ', target[c::-1], 1)[::-1] + \
target[c + 1:]
#: E126
rv.update(dict.fromkeys((
'qualif_nr', 'reasonComment_en', 'reasonComment_fr',
'reasonComment_de', 'reasonComment_it'),
'?'),
"foo")
#: E126
eat_a_dict_a_day({
"foo": "bar",
})
#: E126
if (
x == (
3
) or
y == 4):
pass
#: E126
if (
x == (
3
) or
x == (
3
) or
y == 4):
pass
#:
#: E128
# Arguments on first line forbidden when not using vertical alignment
foo = long_function_name(var_one, var_two,
var_three, var_four)
#
#: E128
print('l.%s\t%s\t%s\t%r' %
(token[2][0], pos, tokenize.tok_name[token[0]], token[1]))
#: E128
def qualify_by_address(self, cr, uid, ids, context=None,
params_to_check=frozenset(QUALIF_BY_ADDRESS_PARAM)):
""" This gets called by the web server """
#:
#: E121
print "hello", (
"there",
# "john",
"dude")
#: E126
troublesome_hash = {
"hash": "value",
"long": "the quick brown fox jumps over the lazy dog before doing a "
"somersault",
}
#: E126
# probably not easily fixed, without using 'ast'
troublesome_hash_ii = {
"long key that tends to happen more when you're indented":
"stringwithalongtoken you don't want to break",
}
#: E128
foo(1, 2, 3,
4, 5, 6)
#: E128
foo(1, 2, 3,
4, 5, 6)
#: E128
foo(1, 2, 3,
4, 5, 6)
#: E128
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E127
foo(1, 2, 3,
4, 5, 6)
#: E124
d = dict('foo',
help="exclude files or directories which match these "
"comma separated patterns (default: %s)" % DEFAULT_EXCLUDE
)
#: E124 E128
if line_removed:
self.event(cr, uid,
name="Removing the option for contract",
description="contract line has been removed",
)
#: E128
if line_removed:
self.event(cr, uid,
name="Removing the option for contract",
description="contract line has been removed",
)
#: E124 E127
if line_removed:
self.event(cr, uid,
name="Removing the option for contract",
description="contract line has been removed",
)
#:
|