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 29fb86e commit 1e980fdCopy full SHA for 1e980fd
crates/ruff_python_index/src/fstring_ranges.rs
@@ -91,7 +91,10 @@ impl FStringRangesBuilder {
91
}
92
93
94
- pub(crate) fn finish(self) -> FStringRanges {
+ pub(crate) fn finish(mut self, end_location: TextSize) -> FStringRanges {
95
+ while let Some(start) = self.start_locations.pop() {
96
+ self.raw.insert(start, TextRange::new(start, end_location));
97
+ }
98
FStringRanges { raw: self.raw }
99
100
crates/ruff_python_index/src/indexer.rs
@@ -72,7 +72,7 @@ impl Indexer {
72
Self {
73
comment_ranges: comment_ranges_builder.finish(),
74
continuation_lines,
75
- fstring_ranges: fstring_ranges_builder.finish(),
+ fstring_ranges: fstring_ranges_builder.finish(locator.text_len()),
76
77
78
0 commit comments