54acd090a8
Also fix the python to comply. This has to be done as a single change otherwise we'll never bootstrap gating. Change-Id: I4a21d57e0341802a1652428dee16c60abb30251d
16 lines
467 B
Python
16 lines
467 B
Python
from pyflakes.scripts import pyflakes
|
|
from pyflakes.checker import Checker
|
|
|
|
|
|
def report_with_bypass(self, messageClass, *args, **kwargs):
|
|
text_lineno = args[0] - 1
|
|
with open(self.filename, 'r') as code:
|
|
if code.readlines()[text_lineno].find('pyflakes_bypass') >= 0:
|
|
return
|
|
self.messages.append(messageClass(self.filename, *args, **kwargs))
|
|
|
|
# monkey patch checker to support bypass
|
|
Checker.report = report_with_bypass
|
|
|
|
pyflakes.main()
|