mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-27 12:29:28 +00:00
Split implicit concatenated strings before binary expressions (#7145)
This commit is contained in:
parent
9671922e40
commit
e376c3ff7e
20 changed files with 1067 additions and 366 deletions
|
@ -252,9 +252,7 @@ impl Workspace {
|
|||
|
||||
pub fn comments(&self, contents: &str) -> Result<String, Error> {
|
||||
let parsed = ParsedModule::from_source(contents)?;
|
||||
let formatted = parsed.format().map_err(into_error)?;
|
||||
let comments = pretty_comments(&formatted, contents);
|
||||
|
||||
let comments = pretty_comments(&parsed.module, &parsed.comment_ranges, contents);
|
||||
Ok(comments)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue