From 5d98ec604e0f11c477c10355fcc0cf6e4bf55db7 Mon Sep 17 00:00:00 2001 From: myint Date: Sun, 4 Dec 2011 10:35:47 -0800 Subject: [PATCH] Take care of "1 #comment" case. --- autopep8.py | 2 +- test_target.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/autopep8.py b/autopep8.py index dd87b5f8..9f6c8182 100644 --- a/autopep8.py +++ b/autopep8.py @@ -221,7 +221,7 @@ def fix_e261(self, result): self.source[result['line'] - 1] = fixed def fix_e262(self, result): - self._fix_whitespace(result, r"##*", "#") + self._fix_whitespace(result, r"##* *", "# ") def fix_e301(self, result): cr = self.newline diff --git a/test_target.py b/test_target.py index 49048fde..c13b1760 100644 --- a/test_target.py +++ b/test_target.py @@ -8,6 +8,7 @@ def foo(): print 2 # e261 print 2 ## e262 print 2 #### e262 +print 2 #e262 1 /1 1 *2 1 +1