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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 27 Jul 2011 19:07:01 +0200
branch
5_1_x
changeset 1204
398b99016b07
parent 1202
d8ab3b7966e4
child 1207
f6d920580635

Fix an issue in the PEP8 fixer dealing with win end of line markers.
(transplanted from 2e9f25df356fe05c9f4e665e78e3c41a397b471d)

Plugins/CheckerPlugins/Pep8/Pep8Fixer.py file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/Pep8/Pep8Fixer.py	Tue Jul 26 20:02:21 2011 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep8Fixer.py	Wed Jul 27 19:07:01 2011 +0200
@@ -180,7 +180,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