summaryrefslogtreecommitdiff
path: root/testsuite/W19.py
blob: ac2095bec89faa2ff3866a2ddbd2ac0e9f91533f (plain)
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
#: W191
if False:
	print  # indented with 1 tab
#:


#: E126 W191
y = x == 2 \
	or x == 3
#: E101 W191
if (
        x == (
            3
        ) or
        y == 4):
	pass
#: E101 W191
if x == 2 \
    or y > 1 \
        or x == 3:
	pass
#: E101 W191
if x == 2 \
        or y > 1 \
        or x == 3:
	pass
#:

#: E101 W191
if (foo == bar and
        baz == frop):
	pass
#: E101 W191
if (
    foo == bar and
    baz == frop
):
	pass
#:

#: E101 W191
if start[1] > end_col and not (
        over_indent == 4 and indent_next):
	return(0, "E121 continuation line over-"
	       "indented for visual indent")
#:

#: E101 W191


def long_function_name(
        var_one, var_two, var_three,
        var_four):
	print(var_one)
#: E101 W191
if ((row < 0 or self.moduleCount <= row or
     col < 0 or self.moduleCount <= col)):
	raise Exception("%s,%s - %s" % (row, col, self.moduleCount))
#: E101 W191
if bar:
	return(
	    start, 'E121 lines starting with a '
	    'closing bracket should be indented '
	    "to match that of the opening "
	    "bracket's line"
	)
#
#: E101 W191
# you want vertical alignment, so use a parens
if ((foo.bar("baz") and
     foo.bar("frop")
     )):
	print "yes"
#: E101 W191
# also ok, but starting to look like LISP
if ((foo.bar("baz") and
     foo.bar("frop"))):
	print "yes"
#: E101 W191
if (a == 2 or
    b == "abc def ghi"
         "jkl mno"):
	return True
#: E101 W191
if (a == 2 or
    b == """abc def ghi
jkl mno"""):
	return True
#: E101 W191
if length > options.max_line_length:
	return options.max_line_length, \
	    "E501 line too long (%d characters)" % length


#
#: E101 W191
if os.path.exists(os.path.join(path, PEP8_BIN)):
	cmd = ([os.path.join(path, PEP8_BIN)] +
	       self._pep8_options(targetfile))
#: W191
'''
	multiline string with tab in it'''
#: E101 W191
'''multiline string
	with tabs
   and spaces
'''
#: E101 W191
if foo is None and bar is "frop" and \
        blah == 'yeah':
	blah = 'yeahnah'
#: