[pylint] Add fix for duplicate-bases (PLE0241) (#12105)

## Summary

This adds a fix for the `duplicate-bases` rule that removes the
duplicate base from the class definition.

## Test Plan

`cargo nextest run duplicate_bases`, `cargo insta review`.
This commit is contained in:
Gilles Peiffer 2024-06-29 19:48:24 +02:00 committed by GitHub
parent da78de0439
commit d1079680bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 225 additions and 14 deletions

View file

@ -202,11 +202,11 @@ pub(crate) enum Parentheses {
}
/// Generic function to remove arguments or keyword arguments in function
/// calls and class definitions. (For classes `args` should be considered
/// `bases`)
/// calls and class definitions. (For classes, `args` should be considered
/// `bases`.)
///
/// Supports the removal of parentheses when this is the only (kw)arg left.
/// For this behavior, set `remove_parentheses` to `true`.
/// For this behavior, set `parentheses` to `Parentheses::Remove`.
pub(crate) fn remove_argument<T: Ranged>(
argument: &T,
arguments: &Arguments,