Skip to content

Commit 82e0a97

Browse files
authored
Clarify behavior of PLW3201 (#6657)
Otherwise it is unclear that violations will be raised for methods like `_foo_`
1 parent a8d7bba commit 82e0a97

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/ruff/src/rules/pylint/rules/bad_dunder_method_name.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ use crate::checkers::ast::Checker;
77

88
/// ## What it does
99
/// Checks for any misspelled dunder name method and for any method
10-
/// defined with `__...__` that's not one of the pre-defined methods.
10+
/// defined with `_..._` that's not one of the pre-defined methods
1111
///
1212
/// The pre-defined methods encompass all of Python's standard dunder
1313
/// methods.
1414
///
15+
/// Note this includes all methods starting and ending with at least
16+
/// one underscore to detect mistakes.
17+
///
1518
/// ## Why is this bad?
1619
/// Misspelled dunder name methods may cause your code to not function
1720
/// as expected.

0 commit comments

Comments
 (0)