Plugins/CheckerPlugins/Pep8/Pep8Fixer.py

branch
5_1_x
changeset 1204
398b99016b07
parent 1030
a58e75911f68
child 1510
e75ecf2bd9dd
equal deleted inserted replaced
1202:d8ab3b7966e4 1204:398b99016b07
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 """

eric ide

mercurial