mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
check-code: drop the 'format' built-in
I'm not clear what it is doing, but one who knows what it is about can now make use of it.
This commit is contained in:
parent
b59fc6f804
commit
624cc99b09
@ -239,8 +239,6 @@ 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'(?<!def)\s+(format)\(',
|
||||
"format not available in Python 2.4", 'no-py24'),
|
||||
(r'if\s.*\selse', "if ... else form not available in Python 2.4"),
|
||||
(r'^\s*(%s)\s\s' % '|'.join(keyword.kwlist),
|
||||
"gratuitous whitespace after Python keyword"),
|
||||
|
@ -18,10 +18,6 @@
|
||||
> a, '\\\\\\\\', "\\\\\\" x-2", "c-1"
|
||||
> EOF
|
||||
$ cat > non-py24.py <<EOF
|
||||
> # Using builtins that does not exist in Python 2.4
|
||||
> if True:
|
||||
> y = format(x)
|
||||
>
|
||||
> # try/except/finally block does not exist in Python 2.4
|
||||
> try:
|
||||
> pass
|
||||
@ -68,9 +64,6 @@
|
||||
./quote.py:5:
|
||||
> '"""', 42+1, """and
|
||||
missing whitespace in expression
|
||||
./non-py24.py:3:
|
||||
> y = format(x)
|
||||
format not available in Python 2.4
|
||||
./classstyle.py:4:
|
||||
> class oldstyle_class:
|
||||
old-style class, use class foo(object)
|
||||
|
Loading…
Reference in New Issue
Block a user