---
source: crates/ruff_linter/src/rules/pylint/mod.rs
---
PLE0241 [*] Duplicate base `A` for class `F1`
  --> duplicate_bases.py:13:13
   |
12 | # Duplicate base class is last.
13 | class F1(A, A):
   |             ^
14 |     ...
   |
help: Remove duplicate base
   |
12 | # Duplicate base class is last.
   - class F1(A, A):
13 + class F1(A):
14 |     ...
   |

PLE0241 [*] Duplicate base `A` for class `F2`
  --> duplicate_bases.py:17:13
   |
17 | class F2(A, A,):
   |             ^
18 |     ...
   |
help: Remove duplicate base
   |
16 |
   - class F2(A, A,):
17 + class F2(A,):
18 |     ...
   |

PLE0241 [*] Duplicate base `A` for class `F3`
  --> duplicate_bases.py:23:5
   |
21 | class F3(
22 |     A,
23 |     A
   |     ^
24 | ):
25 |     ...
   |
help: Remove duplicate base
   |
21 | class F3(
   -     A,
22 |     A
   |

PLE0241 [*] Duplicate base `A` for class `F4`
  --> duplicate_bases.py:30:5
   |
28 | class F4(
29 |     A,
30 |     A,
   |     ^
31 | ):
32 |     ...
   |
help: Remove duplicate base
   |
29 |     A,
   -     A,
30 | ):
   |

PLE0241 [*] Duplicate base `A` for class `G1`
  --> duplicate_bases.py:36:13
   |
35 | # Duplicate base class is not last.
36 | class G1(A, A, B):
   |             ^
37 |     ...
   |
help: Remove duplicate base
   |
35 | # Duplicate base class is not last.
   - class G1(A, A, B):
36 + class G1(A, B):
37 |     ...
   |

PLE0241 [*] Duplicate base `A` for class `G2`
  --> duplicate_bases.py:40:13
   |
40 | class G2(A, A, B,):
   |             ^
41 |     ...
   |
help: Remove duplicate base
   |
39 |
   - class G2(A, A, B,):
40 + class G2(A, B,):
41 |     ...
   |

PLE0241 [*] Duplicate base `A` for class `G3`
  --> duplicate_bases.py:46:5
   |
44 | class G3(
45 |     A,
46 |     A,
   |     ^
47 |     B
48 | ):
   |
help: Remove duplicate base
   |
45 |     A,
   -     A,
46 |     B
   |

PLE0241 [*] Duplicate base `A` for class `G4`
  --> duplicate_bases.py:54:5
   |
52 | class G4(
53 |     A,
54 |     A,
   |     ^
55 |     B,
56 | ):
   |
help: Remove duplicate base
   |
53 |     A,
   -     A,
54 |     B,
   |

PLE0241 [*] Duplicate base `Foo` for class `Bar`
  --> duplicate_bases.py:76:5
   |
74 | # https://github.com/astral-sh/ruff/issues/18814
75 | class Bar(Foo,  # 1
76 |     Foo  # 2
   |     ^^^
77 | ):
78 |     pass
   |
help: Remove duplicate base
   |
74 | # https://github.com/astral-sh/ruff/issues/18814
   - class Bar(Foo,  # 1
   -     Foo  # 2
75 + class Bar(Foo  # 2
76 | ):
   |
note: This is an unsafe fix and may change runtime behavior
