Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG28002d25eb54: contrib: black manages whitespace after Python keywords now
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | contrib/check-code.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
093dd5cfba8e | 268a9625bcb1 | Augie Fackler | Oct 5 2019, 10:48 AM |
if k not in ('print', 'exec')), | if k not in ('print', 'exec')), | ||||
"Python keyword is not a function"), | "Python keyword is not a function"), | ||||
# (r'class\s[A-Z][^\(]*\((?!Exception)', | # (r'class\s[A-Z][^\(]*\((?!Exception)', | ||||
# "don't capitalize non-exception classes"), | # "don't capitalize non-exception classes"), | ||||
# (r'in range\(', "use xrange"), | # (r'in range\(', "use xrange"), | ||||
# (r'^\s*print\s+', "avoid using print in core and extensions"), | # (r'^\s*print\s+', "avoid using print in core and extensions"), | ||||
(r'[\x80-\xff]', "non-ASCII character literal"), | (r'[\x80-\xff]', "non-ASCII character literal"), | ||||
(r'("\')\.format\(', "str.format() has no bytes counterpart, use %"), | (r'("\')\.format\(', "str.format() has no bytes counterpart, use %"), | ||||
(r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist), | |||||
"gratuitous whitespace after Python keyword"), | |||||
(r'([\(\[][ \t]\S)|(\S[ \t][\)\]])', "gratuitous whitespace in () or []"), | (r'([\(\[][ \t]\S)|(\S[ \t][\)\]])', "gratuitous whitespace in () or []"), | ||||
# (r'\s\s=', "gratuitous whitespace before ="), | # (r'\s\s=', "gratuitous whitespace before ="), | ||||
(r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S', | (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S', | ||||
"missing whitespace around operator"), | "missing whitespace around operator"), | ||||
(r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\s', | (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\s', | ||||
"missing whitespace around operator"), | "missing whitespace around operator"), | ||||
(r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S', | (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=|%=)\S', | ||||
"missing whitespace around operator"), | "missing whitespace around operator"), |