Skip to content

Commit

Permalink
skip common dunders
Browse files Browse the repository at this point in the history
  • Loading branch information
diceroll123 committed Dec 16, 2023
1 parent 4a6f188 commit f112dbf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ pub(crate) fn unnecessary_dunder_call(checker: &mut Checker, expr: &Expr) {
return;
}

// skip `__init__` calls
if attr == "__init__" {
// skip common/irreplaceable dunder methods
if ["__init__", "__new__", "__init_subclass__", "__subclasses__"].contains(&attr.as_str()) {
return;
}

Expand Down

0 comments on commit f112dbf

Please sign in to comment.