mirror of https://github.com/astral-sh/ruff
Trim dedented sections for arg detection (#793)
This commit is contained in:
parent
aafddae644
commit
6602f7f489
|
|
@ -1359,7 +1359,10 @@ static GOOGLE_ARGS_REGEX: Lazy<Regex> =
|
|||
|
||||
fn args_section(checker: &mut Checker, definition: &Definition, context: &SectionContext) {
|
||||
let mut args_sections: Vec<String> = vec![];
|
||||
for line in textwrap::dedent(&context.following_lines.join("\n")).lines() {
|
||||
for line in textwrap::dedent(&context.following_lines.join("\n"))
|
||||
.trim()
|
||||
.lines()
|
||||
{
|
||||
if line
|
||||
.chars()
|
||||
.next()
|
||||
|
|
|
|||
Loading…
Reference in New Issue