We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f180c3f commit 03e2fffCopy full SHA for 03e2fff
1 file changed
codeflash/languages/python/static_analysis/code_extractor.py
@@ -432,9 +432,7 @@ def _has_aliased_future_imports(module: cst.Module) -> bool:
432
for s in stmt.body:
433
if (
434
isinstance(s, cst.ImportFrom)
435
- and s.module is not None
436
- and isinstance(s.module, (cst.Attribute, cst.Name))
437
- and hasattr(s.module, "value")
+ and isinstance(s.module, cst.Name)
438
and s.module.value == "__future__"
439
and isinstance(s.names, (list, tuple))
440
and any(name.asname is not None for name in s.names)
0 commit comments