mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 13:51:37 +00:00
Track quoting style in the tokenizer (#10256)
This commit is contained in:
parent
72c9f7e4c9
commit
c504d7ab11
55 changed files with 4595 additions and 3800 deletions
|
@ -131,10 +131,7 @@ fn extract_noqa_line_for(lxr: &[LexResult], locator: &Locator, indexer: &Indexer
|
|||
|
||||
// For multi-line strings, we expect `noqa` directives on the last line of the
|
||||
// string.
|
||||
Tok::String {
|
||||
triple_quoted: true,
|
||||
..
|
||||
} => {
|
||||
Tok::String { kind, .. } if kind.is_triple_quoted() => {
|
||||
if locator.contains_line_break(*range) {
|
||||
string_mappings.push(TextRange::new(
|
||||
locator.line_start(range.start()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue