[NumPy-Tickets] [NumPy] #1408: alter_code1.changeimports does not recognize certain import strings
NumPy Trac
numpy-tickets@scipy....
Wed Feb 24 10:14:39 CST 2010
#1408: alter_code1.changeimports does not recognize certain import strings
---------------------------------------+------------------------------------
Reporter: Andrew MacKeith | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.oldnumeric | Version: 1.4.0
Keywords: alter_code1 changeimports |
---------------------------------------+------------------------------------
numpy.oldnumeric.alter_code1.changeimports will not recognize certain
import strings that contain several names to import.[[BR]]
For example, it does not recognize:
{{{
import math, time, sys, os, Numeric
}}}
I looked at the re pattern, and I think it needs this change to fix it.
{{{
From: r'(import\s+[^,\n\r]+,\s*)(%s)' % name
To: r'(import\s+[^;\n\r]+,\s*)(%s)' % name
}}}
AFAICT the reason for the complemented set is to ensure the name is part
of the import statement, which normally ends with a ; or new line.
The pattern was previously changed in ticket 3201 by Travis.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1408>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list