Fix an issue in the PEP8 fixer dealing with win end of line markers.

Wed, 27 Jul 2011 19:07:01 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 27 Jul 2011 19:07:01 +0200
changeset 1203
2e9f25df356f
parent 1199
d3d4790602f2
child 1205
7337fde4e4d2

Fix an issue in the PEP8 fixer dealing with win end of line markers.

Plugins/CheckerPlugins/Pep8/Pep8Fixer.py file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/Pep8/Pep8Fixer.py	Tue Jul 26 20:00:18 2011 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep8Fixer.py	Wed Jul 27 19:07:01 2011 +0200
@@ -181,7 +181,7 @@
         @return flag indicating an applied fix (boolean) and a message for
             the fix (string)
         """
-        self.__source[line - 1] = re.sub(r'[\t ]*$', "",
+        self.__source[line - 1] = re.sub(r'[\t ]+(\r?)$', r"\1",
                                          self.__source[line - 1])
         return (True, self.trUtf8("Whitespace stripped from end of line."))
     

eric ide

mercurial