Skip to content

Commit

Permalink
Clarify behavior of PLW3201 (#6657)
Browse files Browse the repository at this point in the history
Otherwise it is unclear that violations will be raised for methods like
`_foo_`
  • Loading branch information
zanieb authored Aug 17, 2023
1 parent a8d7bba commit 82e0a97
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/ruff/src/rules/pylint/rules/bad_dunder_method_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 82e0a97

Please sign in to comment.