mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-28 02:39:59 +00:00
Our token-based rules and `noqa` extraction used an `Indexer` that kept track of f-string ranges but not t-strings. We've updated the `Indexer` and downstream uses thereof to handle both f-strings and t-strings. Most of the diff is renaming and adding tests. Note that much of the "new" logic gets to be naive because the lexer has already ensured that f and t-string "starts" are paired with their respective "ends", even amidst nesting and so on. Finally: one could imagine wanting to know if a given interpolated string range corresponds to an f-string or a t-string, but I didn't find a place where we actually needed this. Closes #20310 |
||
|---|---|---|
| .. | ||
| visitor | ||
| comparable.rs | ||
| docstrings.rs | ||
| expression.rs | ||
| generated.rs | ||
| helpers.rs | ||
| identifier.rs | ||
| int.rs | ||
| lib.rs | ||
| name.rs | ||
| node.rs | ||
| node_index.rs | ||
| nodes.rs | ||
| operator_precedence.rs | ||
| parenthesize.rs | ||
| python_version.rs | ||
| relocate.rs | ||
| script.rs | ||
| statement_visitor.rs | ||
| stmt_if.rs | ||
| str.rs | ||
| str_prefix.rs | ||
| traversal.rs | ||
| types.rs | ||
| visitor.rs | ||
| whitespace.rs | ||