From 8659f2f4ead407093b71a17cccc6c7fd383fa089 Mon Sep 17 00:00:00 2001 From: Auguste Lalande Date: Wed, 24 Jul 2024 00:08:53 -0400 Subject: [PATCH] [`pydoclint`] Fix documentation for `DOC501` (#12483) ## Summary The doc was written backwards. mb. --- .../src/rules/pydoclint/rules/check_docstring.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs b/crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs index 10d486bd3fb5a..4e79031842213 100644 --- a/crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs +++ b/crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs @@ -19,9 +19,9 @@ use crate::rules::pydocstyle::settings::Convention; /// explicitly-raised exceptions. /// /// ## Why is this bad? -/// If a raise is mentioned in a docstring, but the function itself does not -/// explicitly raise it, it can be misleading to users and/or a sign of -/// incomplete documentation or refactors. +/// If a function raises an exception without documenting it in its docstring, +/// it can be misleading to users and/or a sign of incomplete documentation or +/// refactors. /// /// ## Example /// ```python