Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a future import spans multiple lines, futurize crashes trying to refactor it.
$ cat weirdimport.py from __future__ import (absolute_import, division, unicode_literals) print 3 $ futurize weirdimport.py RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: ws_comma Traceback (most recent call last): File ".../bin/futurize", line 9, in <module> load_entry_point('future==0.15.2', 'console_scripts', 'futurize')() File ".../site-packages/future-0.15.2-py2.7.egg/libfuturize/main.py", line 293, in main options.processes) File ".../lib2to3/refactor.py", line 706, in refactor items, write, doctests_only) File ".../lib2to3/refactor.py", line 301, in refactor self.refactor_file(dir_or_file, write, doctests_only) File ".../lib2to3/refactor.py", line 747, in refactor_file *args, **kwargs) File ".../lib2to3/refactor.py", line 354, in refactor_file tree = self.refactor_string(input, filename) File ".../lib2to3/refactor.py", line 386, in refactor_string self.refactor_tree(tree, name) File ".../lib2to3/refactor.py", line 460, in refactor_tree new = fixer.transform(node, results) File ".../site-packages/future-0.15.2-py2.7.egg/libfuturize/fixes/fix_print_with_import.py", line 20, in transform future_import(u'print_function', node) File ".../site-packages/future-0.15.2-py2.7.egg/libfuturize/fixer_util.py", line 210, in future_import names = check_future_import(node) File ".../site-packages/future-0.15.2-py2.7.egg/libfuturize/fixer_util.py", line 426, in check_future_import assert False, "strange import: %s" % savenode AssertionError: strange import: from __future__ import (absolute_import, division, unicode_literals) $ futurize --version 0.15.2
The text was updated successfully, but these errors were encountered:
Dupe of #113.
Sorry, something went wrong.
Thanks, closing this one
No branches or pull requests
When a future import spans multiple lines, futurize crashes trying to refactor it.
The text was updated successfully, but these errors were encountered: