Mercurial > hg
comparison contrib/check-code.py @ 24836:1f9127c9239b stable
check-code: check os.path.join(*, '') not working correctly with Python 2.7.9
Since Python 2.7.9, "os.path.join(path, '')" doesn't append "os.sep"
for UNC path (see issue4557 for detail).
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 22 Apr 2015 23:38:55 +0900 |
parents | 65f1a29685ab |
children | ded7302e1c83 |
comparison
equal
deleted
inserted
replaced
24835:e4f75c93f073 | 24836:1f9127c9239b |
---|---|
299 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"), | 299 (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"), |
300 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', | 300 (r'ui\.(status|progress|write|note|warn)\([\'\"]x', |
301 "missing _() in ui message (use () to hide false-positives)"), | 301 "missing _() in ui message (use () to hide false-positives)"), |
302 (r'release\(.*wlock, .*lock\)', "wrong lock release order"), | 302 (r'release\(.*wlock, .*lock\)', "wrong lock release order"), |
303 (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"), | 303 (r'\b__bool__\b', "__bool__ should be __nonzero__ in Python 2"), |
304 (r'os\.path\.join\(.*, *(""|\'\')\)', | |
305 "use pathutil.normasprefix(path) instead of os.path.join(path, '')"), | |
304 ], | 306 ], |
305 # warnings | 307 # warnings |
306 [ | 308 [ |
307 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"), | 309 (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"), |
308 ] | 310 ] |