Merge lp:~icic/pyflakes/devel into lp:~vcs-imports/pyflakes/main

Proposed by Brian Olson
Status: Rejected
Rejected by: Jelmer Vernooij
Proposed branch: lp:~icic/pyflakes/devel
Merge into: lp:~vcs-imports/pyflakes/main
Diff against target: 18 lines (+8/-1)
1 file modified
pyflakes/scripts/pyflakes.py (+8/-1)
To merge this branch: bzr merge lp:~icic/pyflakes/devel
Reviewer Review Type Date Requested Status
Gavin Panella (community) Abstain
Review via email: mp+82900@code.launchpad.net

Description of the change

Make warning suppressable by tagging suspicious lines of code with # FLAKE_OK

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

I think lp:pyflakes is long dead. I found the same thing out this
morning. All development is now going into lp:divmod.org.

review: Abstain

Unmerged revisions

42. By Brian Olson

Hide warnings by tagging source lines with "# FLAKE_OK"

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'pyflakes/scripts/pyflakes.py'
2--- pyflakes/scripts/pyflakes.py 2010-04-13 15:53:04 +0000
3+++ pyflakes/scripts/pyflakes.py 2011-11-21 15:47:58 +0000
4@@ -54,8 +54,15 @@
5 # Okay, it's syntactically valid. Now check it.
6 w = checker.Checker(tree, filename)
7 w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))
8+ lines = None
9 for warning in w.messages:
10- print warning
11+ if not lines:
12+ lines = codeString.splitlines()
13+ if '# FLAKE_OK' in lines[warning.lineno - 1]:
14+ # skip flagged things
15+ pass
16+ else:
17+ print warning
18 return len(w.messages)
19
20

Subscribers

People subscribed via source and target branches

to all changes: