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.
1 parent a6e4dc8 commit 104a5acCopy full SHA for 104a5ac
codeflash/code_utils/code_extractor.py
@@ -528,6 +528,10 @@ def add_needed_imports_from_module(
528
529
try:
530
for mod in gatherer.module_imports:
531
+ # Skip __future__ imports as they cannot be imported directly
532
+ # __future__ imports should only be imported with specific objects
533
+ if mod == "__future__":
534
+ continue
535
if mod not in dotted_import_collector.imports:
536
AddImportsVisitor.add_needed_import(dst_context, mod)
537
RemoveImportsVisitor.remove_unused_import(dst_context, mod)
0 commit comments