File tree Expand file tree Collapse file tree
crates/static-analysis-kernel/src/analysis/languages/python Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,13 +232,9 @@ fn parse_import_statement<'tree, 'text: 'tree>(
232232 // We loop so that if creating the `Import` fails, we can try any subsequent imports within
233233 // this node (e.g. in a comma-separated list) to avoid prematurely yielding `None` on the iterator.
234234 while idx < node. named_child_count ( ) {
235- let field_name = node. field_name_for_named_child ( idx as u32 ) ;
236235 let name_node = node. named_child ( idx) . expect ( "should be in-bounds" ) ;
237236 idx += 1 ;
238237
239- if field_name != Some ( "name" ) {
240- continue ;
241- }
242238 if let Some ( parsed) = parse_field_child_node ( source_code, name_node) {
243239 if let Ok ( import) = Import :: try_new ( parsed. full_text , parsed. alias , None , false ) {
244240 return Some ( import) ;
You can’t perform that action at this time.
0 commit comments