mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-19 20:24:27 +00:00
[refurb] Preserve argument ordering in autofix (FURB103) (#20790)
Fixes https://github.com/astral-sh/ruff/issues/20785
This commit is contained in:
parent
1d111c8780
commit
b93d8f2b9f
6 changed files with 53 additions and 3 deletions
|
|
@ -3372,7 +3372,7 @@ impl Arguments {
|
|||
pub fn arguments_source_order(&self) -> impl Iterator<Item = ArgOrKeyword<'_>> {
|
||||
let args = self.args.iter().map(ArgOrKeyword::Arg);
|
||||
let keywords = self.keywords.iter().map(ArgOrKeyword::Keyword);
|
||||
args.merge_by(keywords, |left, right| left.start() < right.start())
|
||||
args.merge_by(keywords, |left, right| left.start() <= right.start())
|
||||
}
|
||||
|
||||
pub fn inner_range(&self) -> TextRange {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue