[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

Benjamin Peterson report at bugs.python.org
Sun Dec 14 20:50:52 CET 2008


Benjamin Peterson <musiccomposition at gmail.com> added the comment:

Here's one which doesn't work correctly:

$ 2to3 -
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
import cStringIO, HTMLParser
--- <stdin> (original)
+++ <stdin> (refactored)
@@ -1,1 +1,1 @@
-import cStringIO, HTMLParser
+import io, HTMLParser
RefactoringTool: Files that need to be modified:
RefactoringTool: <stdin>

This is because the fix_imports pattern catching one module per import
statement.

----------
nosy: +benjamin.peterson

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4664>
_______________________________________


More information about the Python-bugs-list mailing list