From 82e0a97b34ad506d3762b531cded138b4119cbc5 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 17 Aug 2023 14:41:55 -0500 Subject: [PATCH] Clarify behavior of `PLW3201` (#6657) Otherwise it is unclear that violations will be raised for methods like `_foo_` --- crates/ruff/src/rules/pylint/rules/bad_dunder_method_name.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/ruff/src/rules/pylint/rules/bad_dunder_method_name.rs b/crates/ruff/src/rules/pylint/rules/bad_dunder_method_name.rs index 3887ab252af9c..e7a3149e4fcf3 100644 --- a/crates/ruff/src/rules/pylint/rules/bad_dunder_method_name.rs +++ b/crates/ruff/src/rules/pylint/rules/bad_dunder_method_name.rs @@ -7,11 +7,14 @@ use crate::checkers::ast::Checker; /// ## What it does /// Checks for any misspelled dunder name method and for any method -/// defined with `__...__` that's not one of the pre-defined methods. +/// defined with `_..._` that's not one of the pre-defined methods /// /// The pre-defined methods encompass all of Python's standard dunder /// methods. /// +/// Note this includes all methods starting and ending with at least +/// one underscore to detect mistakes. +/// /// ## Why is this bad? /// Misspelled dunder name methods may cause your code to not function /// as expected.