forked from hhatto/autopep8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_target.py
161 lines (112 loc) · 2.06 KB
/
test_target.py
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
import sys, os
def foo():
import subprocess, argparse
import copy; import math, email
print 1
print 2 # e261
d = {# e261
1: 2
}
print 2 ## e262
print 2 #### e262
print 2 #e262
print 2 # e262
1 /1
1 *2
1 +1
1 -1
1 **2
def dummy1 ( a ):
print a
print a
def dummy2(a) :
if 1 in a:
print "a"
print 1+1 # e225
print 1 +1 # e225
print 1+ 1 # e225
print 1 +1 # e221+e225
print 1 + 1 # e221
print 1 * 1 # e221
print 1 + 1 # e222
print 1 * 1 # e222
print a
def func1():
print "A"
return 0
def func11():
a = (1,2, 3,"a")
b = [1, 2, 3,"b"]
c = 0,11/2
return 1
# comment after too empty lines
def func2():
pass
def func22():
pass;
def func_oneline(): print 1
def func_last():
if True: print 1
pass
def func_e251(a, b=1, c = 3):
pass
def func_e251_t(a, b=1, c = 3, d = 4):
pass
# e201
( 1)
[ 1]
{ 1: 2}
# e202
(1 )
[1 ]
{1: 2 }
# e203
{4 : 2}
[4 , 2]
# e211
d = [1]
d [0]
dummy1 (0)
def func_e702():
4; 1;
4; 1;
4; 1;
4; 1;
print 2; print 4; 6;8
if True:
1; 2; 3
0; 1
2;3
4; 5;
def func_w602():
raise ValueError, "w602 test"
raise ValueError, "w602 test" # my comment
raise ValueError
raise ValueError # comment
raise ValueError, 'arg' ; print 1
raise ValueError, 'arg' ; print 2 # my comment
raise ValueError, \
'arg no comment'
raise ValueError, \
'arg' # my comment
raise ValueError, \
"""arg""" # my comment
raise ValueError, \
"""arg
""" # my comment
raise ValueError, \
'''multiline
''' # my comment
a = 'a'
raise ValueError, "%s" % (a,)
raise 'string'
def func_w603():
if 1 <> 2:
if 2 <> 2:
print True
else:
print False
def func_w604():
a = 1.1
b = ```a```
if __name__ == '__main__': func_last()