94 excludeMessages (str), includeMessages (str), repeatMessages |
94 excludeMessages (str), includeMessages (str), repeatMessages |
95 (bool), fixCodes (str), noFixCodes (str), fixIssues (bool), |
95 (bool), fixCodes (str), noFixCodes (str), fixIssues (bool), |
96 maxLineLength (int), hangClosing (bool), docType (str), errors |
96 maxLineLength (int), hangClosing (bool), docType (str), errors |
97 (list of str), eol (str), encoding (str)) |
97 (list of str), eol (str), encoding (str)) |
98 @return tuple of stats (dict) and results (tuple for each found violation |
98 @return tuple of stats (dict) and results (tuple for each found violation |
99 of style (tuple of lineno (int), position (int), text (str), fixed |
99 of style (tuple of lineno (int), position (int), text (str), ignored |
100 (bool), autofixing (bool), fixedMsg (str))) |
100 (bool), fixed (bool), autofixing (bool), fixedMsg (str))) |
101 """ |
101 """ |
102 excludeMessages, includeMessages, \ |
102 excludeMessages, includeMessages, \ |
103 repeatMessages, fixCodes, noFixCodes, fixIssues, maxLineLength, \ |
103 repeatMessages, fixCodes, noFixCodes, fixIssues, maxLineLength, \ |
104 hangClosing, docType, errors, eol, encoding = args |
104 hangClosing, docType, errors, eol, encoding = args |
105 |
105 |
164 res, msg, id_ = fixer.fixIssue(lineno, position, text) |
164 res, msg, id_ = fixer.fixIssue(lineno, position, text) |
165 if res == -1: |
165 if res == -1: |
166 itm = [lineno, position, text] |
166 itm = [lineno, position, text] |
167 deferredFixes[id_] = itm |
167 deferredFixes[id_] = itm |
168 else: |
168 else: |
169 itm = [lineno, position, text, res == 1, True, msg] |
169 itm = [lineno, position, text, False, res == 1, True, msg] |
170 else: |
170 else: |
171 itm = [lineno, position, text, False, False, ''] |
171 itm = [lineno, position, text, False, False, False, ''] |
172 results.append(itm) |
172 results.append(itm) |
|
173 else: |
|
174 results.append([lineno, position, text, True, False, False, '']) |
173 |
175 |
174 if fixer: |
176 if fixer: |
175 deferredResults = fixer.finalize() |
177 deferredResults = fixer.finalize() |
176 for id_ in deferredResults: |
178 for id_ in deferredResults: |
177 fixed, msg = deferredResults[id_] |
179 fixed, msg = deferredResults[id_] |