changeset 25198:db77ff0b63da

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 18 May 2015 16:11:44 -0500
parents 6faa7d986a8b
children e78447e61624
files contrib/check-code.py tests/test-check-code.t
diffstat 2 files changed, 0 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Mon May 18 16:09:05 2015 -0500
+++ b/contrib/check-code.py	Mon May 18 16:11:44 2015 -0500
@@ -239,8 +239,6 @@
 #    (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"),
--- a/tests/test-check-code.t	Mon May 18 16:09:05 2015 -0500
+++ b/tests/test-check-code.t	Mon May 18 16:11:44 2015 -0500
@@ -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)