##// END OF EJS Templates
check-code: forbid mutable value for default argument...
Pierre-Yves David -
r26348:b80b2ee7 default
parent child Browse files
Show More
@@ -291,6 +291,8 b' pypats = ['
291 (r'os\.path\.join\(.*, *(""|\'\')\)',
291 (r'os\.path\.join\(.*, *(""|\'\')\)',
292 "use pathutil.normasprefix(path) instead of os.path.join(path, '')"),
292 "use pathutil.normasprefix(path) instead of os.path.join(path, '')"),
293 (r'\s0[0-7]+\b', 'legacy octal syntax; use "0o" prefix instead of "0"'),
293 (r'\s0[0-7]+\b', 'legacy octal syntax; use "0o" prefix instead of "0"'),
294 # XXX only catch mutable arguments on the first line of the definition
295 (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"),
294 ],
296 ],
295 # warnings
297 # warnings
296 [
298 [
General Comments 0
You need to be logged in to leave comments. Login now