Patchwork [9,of,9,pyflakes] filterpyflakes: whitelist listcomp aliasing checking

login
register
mail settings
Submitter Augie Fackler
Date Nov. 10, 2016, 9:52 p.m.
Message ID <2e8dd3bf04a35a482b46.1478814752@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/17461/
State Accepted
Headers show

Comments

Augie Fackler - Nov. 10, 2016, 9:52 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1478813838 18000
#      Thu Nov 10 16:37:18 2016 -0500
# Node ID 2e8dd3bf04a35a482b46dccd4cff14015eab47e9
# Parent  36bb399e6ca5cecb2f6f1b7338b2f73569ffbaf0
filterpyflakes: whitelist listcomp aliasing checking

The test change is because of how filterpyflakes is organized - a line
number changed.
Jun Wu - Nov. 12, 2016, 1:07 p.m.
These look good to me.

Excerpts from Augie Fackler's message of 2016-11-10 16:52:32 -0500:
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1478813838 18000
> #      Thu Nov 10 16:37:18 2016 -0500
> # Node ID 2e8dd3bf04a35a482b46dccd4cff14015eab47e9
> # Parent  36bb399e6ca5cecb2f6f1b7338b2f73569ffbaf0
> filterpyflakes: whitelist listcomp aliasing checking
> 
> The test change is because of how filterpyflakes is organized - a line
> number changed.
> 
> diff --git a/tests/filterpyflakes.py b/tests/filterpyflakes.py
> --- a/tests/filterpyflakes.py
> +++ b/tests/filterpyflakes.py
> @@ -36,7 +36,8 @@ for line in sys.stdin:
>              (r"local variable '.*' is assigned to but never used", None),
>              (r"unable to detect undefined names", None),
>              (r"undefined name '.*'",
> -             r"undefined name '(WindowsError|memoryview)'")
> +             r"undefined name '(WindowsError|memoryview)'"),
> +            ("list comprehension", None),
>             ]
>  
>      for msgtype, (pat, excl) in enumerate(pats):
> diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t
> --- a/tests/test-check-pyflakes.t
> +++ b/tests/test-check-pyflakes.t
> @@ -10,6 +10,6 @@ run pyflakes on all tracked files ending
>    > -X mercurial/pycompat.py \
>    > 2>/dev/null \
>    > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
> -  tests/filterpyflakes.py:61: undefined name 'undefinedname'
> +  tests/filterpyflakes.py:62: undefined name 'undefinedname'
>
Yuya Nishihara - Nov. 13, 2016, 11:33 a.m.
On Sat, 12 Nov 2016 13:07:52 +0000, Jun Wu wrote:
> These look good to me.

Sure, queued them, thanks.

Patch

diff --git a/tests/filterpyflakes.py b/tests/filterpyflakes.py
--- a/tests/filterpyflakes.py
+++ b/tests/filterpyflakes.py
@@ -36,7 +36,8 @@  for line in sys.stdin:
             (r"local variable '.*' is assigned to but never used", None),
             (r"unable to detect undefined names", None),
             (r"undefined name '.*'",
-             r"undefined name '(WindowsError|memoryview)'")
+             r"undefined name '(WindowsError|memoryview)'"),
+            ("list comprehension", None),
            ]
 
     for msgtype, (pat, excl) in enumerate(pats):
diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t
--- a/tests/test-check-pyflakes.t
+++ b/tests/test-check-pyflakes.t
@@ -10,6 +10,6 @@  run pyflakes on all tracked files ending
   > -X mercurial/pycompat.py \
   > 2>/dev/null \
   > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
-  tests/filterpyflakes.py:61: undefined name 'undefinedname'
+  tests/filterpyflakes.py:62: undefined name 'undefinedname'