Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
augustelalande committed Jul 19, 2024
1 parent b9da62d commit 09c6452
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,18 +282,15 @@ pub(crate) fn check_docstring(
return;
};

// Only check function docstrings.
if matches!(
member.kind,
MemberKind::Class(_) | MemberKind::NestedClass(_)
) {
return;
}

let docstring_entries = match convention {
Some(Convention::Google) => DocstringEntries::new(section_contexts, SectionStyle::Google),
Some(Convention::Numpy) => DocstringEntries::new(section_contexts, SectionStyle::Numpy),
_ => DocstringEntries::new(section_contexts, section_contexts.style()),
};
let docstring_entries = DocstringEntries::new(section_contexts, section_contexts.style());

let mut visitor = BodyVisitor::new(checker.semantic());
visitor::walk_body(&mut visitor, member.body());
Expand Down

0 comments on commit 09c6452

Please sign in to comment.