178 @param line line number of the issue (integer) |
178 @param line line number of the issue (integer) |
179 @param pos position inside line (integer) |
179 @param pos position inside line (integer) |
180 @return flag indicating an applied fix (boolean) and a message for |
180 @return flag indicating an applied fix (boolean) and a message for |
181 the fix (string) |
181 the fix (string) |
182 """ |
182 """ |
183 self.__source[line - 1] = re.sub(r'[\t ]*$', "", |
183 self.__source[line - 1] = re.sub(r'[\t ]+(\r?)$', r"\1", |
184 self.__source[line - 1]) |
184 self.__source[line - 1]) |
185 return (True, self.trUtf8("Whitespace stripped from end of line.")) |
185 return (True, self.trUtf8("Whitespace stripped from end of line.")) |
186 |
186 |
187 def __fixNewline(self, code, line, pos): |
187 def __fixNewline(self, code, line, pos): |
188 """ |
188 """ |