---
source: crates/ruff_linter/src/rules/ruff/mod.rs
---
RUF047 [*] Empty `else` clause
  --> RUF072_RUF047.py:7:1
   |
 5 |   except Exception:
 6 |       bar()
 7 | / else:
 8 | |     pass
   | |________^
 9 |   finally:
10 |       pass
   |
help: Remove the `else` clause
  |
6 |     bar()
  - else:
  -     pass
7 | finally:
  |

RUF072 [*] Empty `finally` clause
  --> RUF072_RUF047.py:9:1
   |
 7 |   else:
 8 |       pass
 9 | / finally:
10 | |     pass
   | |________^
11 |
12 |   # All non-body clauses are no-ops
   |
help: Remove the `finally` clause
  |
8 |     pass
  - finally:
  -     pass
9 |
  |

RUF047 [*] Empty `else` clause
  --> RUF072_RUF047.py:17:1
   |
15 |   except Exception:
16 |       pass
17 | / else:
18 | |     pass
   | |________^
19 |   finally:
20 |       pass
   |
help: Remove the `else` clause
   |
16 |     pass
   - else:
   -     pass
17 | finally:
   |

RUF072 [*] Empty `finally` clause
  --> RUF072_RUF047.py:19:1
   |
17 |   else:
18 |       pass
19 | / finally:
20 | |     pass
   | |________^
21 |
22 |   # Only the `finally` is empty; `else` has real code
   |
help: Remove the `finally` clause
   |
18 |     pass
   - finally:
   -     pass
19 |
   |

RUF072 [*] Empty `finally` clause
  --> RUF072_RUF047.py:29:1
   |
27 |   else:
28 |       baz()
29 | / finally:
30 | |     pass
   | |________^
   |
help: Remove the `finally` clause
   |
28 |     baz()
   - finally:
   -     pass
   |
