File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/rust/engine/dep_inference/src/python Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ impl ImportCollector<'_> {
110
110
}
111
111
112
112
/// Extract an optional "import name" string from a string-related `tree_sitter::Node`. The string is
113
- /// expected to analyze statically as an import name and so `extract_string` ignore any strings
113
+ /// expected to analyze statically as an import name and so `extract_string` ignores any strings
114
114
/// containing escape sequences as well as any use of f-strings with interpolations.
115
115
fn extract_string ( & self , node : tree_sitter:: Node ) -> Option < String > {
116
116
match node. kind_id ( ) {
@@ -127,7 +127,8 @@ impl ImportCollector<'_> {
127
127
|| content_node. child_count ( ) > 0
128
128
{
129
129
// The `string_content` node is expected to have no children if the string is a simple string literal.
130
- // If there are children, then it means that the string contains escape sequences and is not an import name.
130
+ // If there are children, then it means that the string contains escape sequences and is not an import name
131
+ // (either an `escape_sequence` or `escape_interpolation` node).
131
132
return None ;
132
133
}
133
134
You can’t perform that action at this time.
0 commit comments