Patchwork py24: remove check-code py24 notation

login
register
mail settings
Submitter timeless@mozdev.org
Date March 30, 2016, 8:22 a.m.
Message ID <729343b48cb791a13aec.1459326172@waste.org>
Download mbox | patch
Permalink /patch/14173/
State Accepted
Headers show

Comments

timeless@mozdev.org - March 30, 2016, 8:22 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1459322691 0
#      Wed Mar 30 07:24:51 2016 +0000
# Node ID 729343b48cb791a13aeceb5903d76d30673b4e4b
# Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
py24: remove check-code py24 notation

We require python2.6+
Yuya Nishihara - March 31, 2016, 1:31 p.m.
On Wed, 30 Mar 2016 03:22:52 -0500, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1459322691 0
> #      Wed Mar 30 07:24:51 2016 +0000
> # Node ID 729343b48cb791a13aeceb5903d76d30673b4e4b
> # Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
> py24: remove check-code py24 notation
> 
> We require python2.6+

Sure, queued, thanks.

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -14,7 +14,7 @@ 
  * doublecheck that it is a false match
  * improve the rule pattern
  * add an ignore pattern to the rule (3rd arg) which matches your good line
-   (you can append a short comment and match this, like: #re-raises, # no-py24)
+   (you can append a short comment and match this, like: #re-raises)
  * change the pattern to a warning and list the exception in test-check-code-hg
  * ONLY use no--check-code for skipping entire files from external sources
 """
diff --git a/contrib/import-checker.py b/contrib/import-checker.py
--- a/contrib/import-checker.py
+++ b/contrib/import-checker.py
@@ -200,10 +200,8 @@ 
             stdlib_prefixes.add(dirname)
     for libpath in sys.path:
         # We want to walk everything in sys.path that starts with
-        # something in stdlib_prefixes. check-code suppressed because
-        # the ast module used by this script implies the availability
-        # of any().
-        if not any(libpath.startswith(p) for p in stdlib_prefixes): # no-py24
+        # something in stdlib_prefixes.
+        if not any(libpath.startswith(p) for p in stdlib_prefixes):
             continue
         for top, dirs, files in os.walk(libpath):
             for i, d in reversed(list(enumerate(dirs))):