Show More
@@ -397,6 +397,18 b' pyfilters = [' | |||
|
397 | 397 | (?P=quote))""", reppython), |
|
398 | 398 | ] |
|
399 | 399 | |
|
400 | # non-filter patterns | |
|
401 | pynfpats = [ | |
|
402 | [ | |
|
403 | (r'pycompat\.osname\s*[=!]=\s*[\'"]nt[\'"]', "use pycompat.iswindows"), | |
|
404 | (r'pycompat\.osname\s*[=!]=\s*[\'"]posix[\'"]', "use pycompat.isposix"), | |
|
405 | (r'pycompat\.sysplatform\s*[!=]=\s*[\'"]darwin[\'"]', | |
|
406 | "use pycompat.isdarwin"), | |
|
407 | ], | |
|
408 | # warnings | |
|
409 | [], | |
|
410 | ] | |
|
411 | ||
|
400 | 412 | # extension non-filter patterns |
|
401 | 413 | pyextnfpats = [ |
|
402 | 414 | [(r'^"""\n?[A-Z]', "don't capitalize docstring title")], |
@@ -513,6 +525,7 b' py3pats = [' | |||
|
513 | 525 | |
|
514 | 526 | checks = [ |
|
515 | 527 | ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), |
|
528 | ('python', r'.*\.(py|cgi)$', r'^#!.*python', [], pynfpats), | |
|
516 | 529 | ('python', r'.*hgext.*\.py$', '', [], pyextnfpats), |
|
517 | 530 | ('python 3', r'.*(hgext|mercurial)/(?!demandimport|policy|pycompat).*\.py', |
|
518 | 531 | '', pyfilters, py3pats), |
General Comments 0
You need to be logged in to leave comments.
Login now