--- a/UtilitiesPython2/Py2SyntaxChecker.py Fri Sep 09 09:33:19 2011 +0200 +++ b/UtilitiesPython2/Py2SyntaxChecker.py Fri Sep 09 11:54:20 2011 +0200 @@ -12,7 +12,7 @@ import re import traceback -from Tools import readEncodedFile, normalizeCode +from Tools import readEncodedFile, normalizeCode, extractLineFlags from py2flakes.checker import Checker from py2flakes.messages import ImportStarUsed @@ -117,8 +117,7 @@ continue _fn, lineno, message = warning.getMessageData() - if not lines[lineno - 1].strip()\ - .endswith("__IGNORE_WARNING__"): + if "__IGNORE_WARNING__" not in extractLineFlags(lines[lineno - 1].strip()): strings.extend(["FLAKES_WARNING", _fn, lineno, message]) except SyntaxError as err: if err.text.strip():