mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:42:02 +00:00
Implement From<Located>
for Range
(#3377)
This commit is contained in:
parent
ff2c0dd491
commit
130e733023
232 changed files with 612 additions and 719 deletions
|
@ -154,7 +154,7 @@ impl<'a> Visitor<'a> for ParenthesesNormalizer<'_> {
|
|||
..
|
||||
},
|
||||
) {
|
||||
let (source, start, end) = self.locator.slice(Range::from_located(value));
|
||||
let (source, start, end) = self.locator.slice(Range::from(&*value));
|
||||
// TODO(charlie): Encode this in the AST via separate node types.
|
||||
if !is_radix_literal(&source[start..end]) {
|
||||
value.parentheses = Parenthesize::Always;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue