mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-17 17:10:34 +00:00
[ruff
] itertools.starmap(..., zip(...))
(RUF058
) (#15483)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
c20255abe4
commit
aed0bf1c11
11 changed files with 490 additions and 22 deletions
|
@ -3892,6 +3892,18 @@ impl Arguments {
|
|||
let keywords = self.keywords.iter().map(ArgOrKeyword::Keyword);
|
||||
args.merge_by(keywords, |left, right| left.start() < right.start())
|
||||
}
|
||||
|
||||
pub fn inner_range(&self) -> TextRange {
|
||||
TextRange::new(self.l_paren_range().end(), self.r_paren_range().start())
|
||||
}
|
||||
|
||||
pub fn l_paren_range(&self) -> TextRange {
|
||||
TextRange::at(self.start(), '('.text_len())
|
||||
}
|
||||
|
||||
pub fn r_paren_range(&self) -> TextRange {
|
||||
TextRange::new(self.end() - ')'.text_len(), self.end())
|
||||
}
|
||||
}
|
||||
|
||||
/// An AST node used to represent a sequence of type parameters.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue