check-code: un-ban __builtins__.all now that we're on 2.6
authorAugie Fackler <augie@google.com>
Sat, 16 May 2015 14:34:04 -0400
changeset 25150 d28cc89d92f0
parent 25149 3f0744eeaeaf
child 25151 6eb4bdad198f
check-code: un-ban __builtins__.all now that we're on 2.6
contrib/check-code.py
tests/test-check-code.t
--- a/contrib/check-code.py	Sat May 16 14:30:07 2015 -0400
+++ b/contrib/check-code.py	Sat May 16 14:34:04 2015 -0400
@@ -243,8 +243,8 @@
 #    (r'^\s*print\s+', "avoid using print in core and extensions"),
     (r'[\x80-\xff]', "non-ASCII character literal"),
     (r'("\')\.format\(', "str.format() not available in Python 2.4"),
-    (r'(?<!def)\s+(all|format)\(',
-     "all/format not available in Python 2.4", 'no-py24'),
+    (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	Sat May 16 14:30:07 2015 -0400
+++ b/tests/test-check-code.t	Sat May 16 14:34:04 2015 -0400
@@ -20,7 +20,6 @@
   $ cat > non-py24.py <<EOF
   > # Using builtins that does not exist in Python 2.4
   > if True:
-  >     x = all()
   >     y = format(x)
   > 
   > # try/except/finally block does not exist in Python 2.4
@@ -82,15 +81,12 @@
    > '"""', 42+1, """and
    missing whitespace in expression
   ./non-py24.py:3:
-   >     x = all()
-   all/format not available in Python 2.4
-  ./non-py24.py:4:
    >     y = format(x)
-   all/format not available in Python 2.4
-  ./non-py24.py:24:
+   format not available in Python 2.4
+  ./non-py24.py:23:
    >     try:
    no yield inside try/finally in Python 2.4
-  ./non-py24.py:29:
+  ./non-py24.py:28:
    >     try:
    no yield inside try/finally in Python 2.4
   ./classstyle.py:4: