Plugins/CheckerPlugins/Pep8/Pep8Fixer.py

changeset 1203
2e9f25df356f
parent 1131
7781e396c903
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1199:d3d4790602f2 1203:2e9f25df356f
179 @param line line number of the issue (integer) 179 @param line line number of the issue (integer)
180 @param pos position inside line (integer) 180 @param pos position inside line (integer)
181 @return flag indicating an applied fix (boolean) and a message for 181 @return flag indicating an applied fix (boolean) and a message for
182 the fix (string) 182 the fix (string)
183 """ 183 """
184 self.__source[line - 1] = re.sub(r'[\t ]*$', "", 184 self.__source[line - 1] = re.sub(r'[\t ]+(\r?)$', r"\1",
185 self.__source[line - 1]) 185 self.__source[line - 1])
186 return (True, self.trUtf8("Whitespace stripped from end of line.")) 186 return (True, self.trUtf8("Whitespace stripped from end of line."))
187 187
188 def __fixNewline(self, code, line, pos): 188 def __fixNewline(self, code, line, pos):
189 """ 189 """

eric ide

mercurial