Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 43061:b61324854e93
contrib: allow trailing commas in lists
black manages this for us, so we don't need to worry about this anymore.
Differential Revision: https://phab.mercurial-scm.org/D6977
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 05 Oct 2019 10:47:28 -0400 |
parents | 63e25ae9cdce |
children | 28002d25eb54 |
comparison
equal
deleted
inserted
replaced
43060:63e25ae9cdce | 43061:b61324854e93 |
---|---|
278 "class foo() creates old style object, use class foo(object)", | 278 "class foo() creates old style object, use class foo(object)", |
279 r'#.*old-style'), | 279 r'#.*old-style'), |
280 (r'\b(%s)\(' % '|'.join(k for k in keyword.kwlist | 280 (r'\b(%s)\(' % '|'.join(k for k in keyword.kwlist |
281 if k not in ('print', 'exec')), | 281 if k not in ('print', 'exec')), |
282 "Python keyword is not a function"), | 282 "Python keyword is not a function"), |
283 (r',]', "unneeded trailing ',' in list"), | |
284 # (r'class\s[A-Z][^\(]*\((?!Exception)', | 283 # (r'class\s[A-Z][^\(]*\((?!Exception)', |
285 # "don't capitalize non-exception classes"), | 284 # "don't capitalize non-exception classes"), |
286 # (r'in range\(', "use xrange"), | 285 # (r'in range\(', "use xrange"), |
287 # (r'^\s*print\s+', "avoid using print in core and extensions"), | 286 # (r'^\s*print\s+', "avoid using print in core and extensions"), |
288 (r'[\x80-\xff]', "non-ASCII character literal"), | 287 (r'[\x80-\xff]', "non-ASCII character literal"), |