def filter_nolint(self, issues):
    "\n        Filter out lines that have an explicit NOLINT on them.\n\n        Sometimes the tools themselves don't properly filter these out if\n        there is a complex macro or something.\n        "
    for (tool, tool_issues) in list(issues.items()):
        warning_printed = False
        to_remove = []
        for issue in tool_issues:
            if (not os.path.isabs(issue.filename)):
                if (not warning_printed):
                    self.print_exception_warning(tool)
                    warning_printed = True
                continue
            lines = open(issue.filename, 'r+', encoding='utf-8').readlines()
            line_number = (int(issue.line_number) - 1)
            if ((line_number < len(lines)) and ('NOLINT' in lines[line_number])):
                to_remove.append(issue)
        issues[tool] = [issue for issue in tool_issues if (issue not in to_remove)]
    return issues
Filter out lines that have an explicit NOLINT on them.

Sometimes the tools themselves don't properly filter these out if
there is a complex macro or something.
def filter_nolint(self, issues):
    "\n        Filter out lines that have an explicit NOLINT on them.\n\n        Sometimes the tools themselves don't properly filter these out if\n        there is a complex macro or something.\n        "
    for (tool, tool_issues) in list(issues.items()):
        warning_printed = False
        to_remove = []
        for issue in tool_issues:
            if (not os.path.isabs(issue.filename)):
                if (not warning_printed):
                    self.print_exception_warning(tool)
                    warning_printed = True
                continue
            lines = open(issue.filename, 'r+', encoding='utf-8').readlines()
            line_number = (int(issue.line_number) - 1)
            if ((line_number < len(lines)) and ('NOLINT' in lines[line_number])):
                to_remove.append(issue)
        issues[tool] = [issue for issue in tool_issues if (issue not in to_remove)]
    return issues