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
Post a Comment