blob: a21034524fdc201a9f1150aceb744211b2f6a860 (
plain) (
blame)
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
|
/*
Warnings for Python keywords, built-in names and bad names.
*/
#define PYTHONKW(x) %keywordwarn("'" `x` "' is a python keyword", rename="_%s") `x`
#define PYTHONBN(x) %builtinwarn("'" `x` "' conflicts with a built-in name in python") `x`
/*
Warnings for Python keywords
https://docs.python.org/2/reference/lexical_analysis.html#keywords
*/
PYTHONKW(and);
PYTHONKW(as);
PYTHONKW(assert);
PYTHONKW(async);
PYTHONKW(await);
PYTHONKW(break);
PYTHONKW(class);
PYTHONKW(continue);
PYTHONKW(def);
PYTHONKW(del);
PYTHONKW(elif);
PYTHONKW(else);
PYTHONKW(except);
PYTHONKW(exec);
PYTHONKW(finally);
PYTHONKW(for);
PYTHONKW(from);
PYTHONKW(global);
PYTHONKW(if);
PYTHONKW(import);
PYTHONKW(in);
PYTHONKW(is);
PYTHONKW(lambda);
PYTHONKW(not);
PYTHONKW(or);
PYTHONKW(pass);
PYTHONKW(print);
PYTHONKW(raise);
PYTHONKW(return);
PYTHONKW(try);
PYTHONKW(while);
PYTHONKW(with);
PYTHONKW(yield);
/*
built-in functions
https://docs.python.org/2/library/functions.html
*/
PYTHONBN(abs);
PYTHONBN(apply);
PYTHONBN(bool);
PYTHONBN(buffer);
PYTHONBN(callable);
PYTHONBN(chr);
PYTHONBN(classmethod);
PYTHONBN(cmp);
PYTHONBN(coerce);
PYTHONBN(compile);
PYTHONBN(complex);
PYTHONBN(delattr);
PYTHONBN(dict);
PYTHONBN(dir);
PYTHONBN(divmod);
PYTHONBN(enumerate);
PYTHONBN(eval);
PYTHONBN(execfile);
PYTHONBN(file);
PYTHONBN(filter);
PYTHONBN(float);
PYTHONBN(frozenset);
PYTHONBN(getattr);
PYTHONBN(globals);
PYTHONBN(hasattr);
PYTHONBN(hash);
PYTHONBN(hex);
PYTHONBN(id);
PYTHONBN(input);
PYTHONBN(int);
PYTHONBN(intern);
PYTHONBN(isinstance);
PYTHONBN(issubclass);
PYTHONBN(iter);
PYTHONBN(len);
PYTHONBN(list);
PYTHONBN(locals);
PYTHONBN(long);
PYTHONBN(map);
PYTHONBN(max);
PYTHONBN(min);
PYTHONBN(object);
PYTHONBN(oct);
PYTHONBN(open);
PYTHONBN(ord);
PYTHONBN(pow);
PYTHONBN(property);
PYTHONBN(range);
PYTHONBN(raw_input);
PYTHONBN(reduce);
PYTHONBN(reload);
PYTHONBN(repr);
PYTHONBN(reversed);
PYTHONBN(round);
PYTHONBN(set);
PYTHONBN(setattr);
PYTHONBN(slice);
PYTHONBN(sorted);
PYTHONBN(staticmethod);
PYTHONBN(str);
PYTHONBN(sum);
PYTHONBN(super);
PYTHONBN(tuple);
PYTHONBN(type);
PYTHONBN(unichr);
PYTHONBN(unicode);
PYTHONBN(vars);
PYTHONBN(xrange);
PYTHONBN(zip);
/*
built-in names
boolean type and None
*/
PYTHONBN(True);
PYTHONBN(False);
PYTHONKW(None);
/*
'self' is also a bad Name
*/
PYTHONKW(self);
#undef PYTHONBN
#undef PYTHONKW
|