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 bab03bd commit f7ddcd2Copy full SHA for f7ddcd2
crates/codegen/src/symboltable.rs
@@ -736,12 +736,10 @@ impl SymbolTableBuilder {
736
if let Stmt::ImportFrom(StmtImportFrom { module, names, .. }) = &statement
737
&& module.as_ref().map(|id| id.as_str()) == Some("__future__")
738
{
739
- for feature in names {
740
- if &feature.name == "annotations" {
741
- self.future_annotations = true;
742
- }
743
+ self.future_annotations =
+ self.future_annotations || names.iter().any(|future| &future.name == "annotations");
744
}
+
745
match &statement {
746
Stmt::Global(StmtGlobal { names, .. }) => {
747
for name in names {
0 commit comments