You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running python-modernize on code using both map and itertools.imap produces the wrong code.
For example, running python-modernize on the following code
produces non-working code. python-modernize doesn't change map(add_1, [1, 2, 3]) to list(map(add_1, [1, 2, 3])) as it should.
The issue seems to be caused by libmodernize.fixes.fix_itertools_imports_six fixer running before libmodernize.fixes.fix_map by default. Changing the run order of FixItertoolsImportsSix class to 6 modifies the code correctly.
The text was updated successfully, but these errors were encountered:
Running
python-modernize
on code using bothmap
anditertools.imap
produces the wrong code.For example, running
python-modernize
on the following codeproduces non-working code.
python-modernize
doesn't changemap(add_1, [1, 2, 3])
tolist(map(add_1, [1, 2, 3]))
as it should.The issue seems to be caused by
libmodernize.fixes.fix_itertools_imports_six
fixer running beforelibmodernize.fixes.fix_map
by default. Changing the run order ofFixItertoolsImportsSix
class to 6 modifies the code correctly.The text was updated successfully, but these errors were encountered: