mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
check-code: reintroduce str.format() ban for 3.x porting
In their infinite wisdom, the Python maintainers stripped bytes of its % and format() methods for 3.x. They've now added % back to 3.5, but format() is still missing. Since we don't have any particular need for it, we should keep avoiding it.
This commit is contained in:
parent
c34d269931
commit
2a25c01621
@ -239,6 +239,7 @@ pypats = [
|
||||
# (r'in range\(', "use xrange"),
|
||||
# (r'^\s*print\s+', "avoid using print in core and extensions"),
|
||||
(r'[\x80-\xff]', "non-ASCII character literal"),
|
||||
(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 []"),
|
||||
|
Loading…
Reference in New Issue
Block a user