From 6602f7f489aa8543f06ecd4e330e413f7de16da5 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 17 Nov 2022 12:55:55 -0500 Subject: [PATCH] Trim dedented sections for arg detection (#793) --- src/pydocstyle/plugins.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pydocstyle/plugins.rs b/src/pydocstyle/plugins.rs index 9c7e59af9c..13d328f6fe 100644 --- a/src/pydocstyle/plugins.rs +++ b/src/pydocstyle/plugins.rs @@ -1359,7 +1359,10 @@ static GOOGLE_ARGS_REGEX: Lazy = fn args_section(checker: &mut Checker, definition: &Definition, context: &SectionContext) { let mut args_sections: Vec = 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()