python - How do I get Pyflakes to ignore a statement? -


a lot of our modules start with:

try:     import json except importerror:     django.utils import simplejson json  # python 2.4 fallback. 

...and it's pyflakes warning in entire file:

foo/bar.py:14: redefinition of unused 'json' line 12 

how can pyflakes ignore this?

(normally i'd go read the docs link broken. if nobody has answer, i'll read source.)

if can use flake8 instead - wraps pyflakes pep8 checker - line ending with

# noqa

(in space significant - 2 spaces between end of code , #, 1 between , noqa text) tell checker ignore errors on line.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -