270 results = [] |
270 results = [] |
271 for lineno, errors in errorsDict.items(): |
271 for lineno, errors in errorsDict.items(): |
272 errors.sort(key=lambda x: x[0], reverse=True) |
272 errors.sort(key=lambda x: x[0], reverse=True) |
273 for position, text in errors: |
273 for position, text in errors: |
274 if source: |
274 if source: |
275 if "__IGNORE_WARNING__" not in \ |
275 code = text[0] |
276 extractLineFlags(source[lineno - 1].strip()): |
276 lineFlags = extractLineFlags(source[lineno - 1].strip()) |
|
277 if "__IGNORE_WARNING__" not in lineFlags and \ |
|
278 "__IGNORE_WARNING_{0}__".format(code) not in lineFlags: |
277 if fixer: |
279 if fixer: |
278 res, msg, id_ = fixer.fixIssue(lineno, position, text) |
280 res, msg, id_ = fixer.fixIssue(lineno, position, text) |
279 if res == -1: |
281 if res == -1: |
280 itm = [lineno, position, text] |
282 itm = [lineno, position, text] |
281 deferredFixes[id_] = itm |
283 deferredFixes[id_] = itm |