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:
Pierre-Yves David 2015-05-18 16:11:44 -05:00
parent b59fc6f804
commit 624cc99b09
2 changed files with 0 additions and 9 deletions

View File

@ -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"),

View File

@ -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)