---
source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
snapshot_kind: text
---
B025.py:19:8: B025 try-except block with duplicate exception `ValueError`
   |
17 | except ValueError:
18 |     a = 2
19 | except ValueError:
   |        ^^^^^^^^^^ B025
20 |     a = 2
   |

B025.py:28:8: B025 try-except block with duplicate exception `pickle.PickleError`
   |
26 | except ValueError:
27 |     a = 2
28 | except pickle.PickleError:
   |        ^^^^^^^^^^^^^^^^^^ B025
29 |     a = 2
   |

B025.py:35:8: B025 try-except block with duplicate exception `ValueError`
   |
33 | except (ValueError, TypeError):
34 |     a = 2
35 | except ValueError:
   |        ^^^^^^^^^^ B025
36 |     a = 2
37 | except (OSError, TypeError):
   |

B025.py:37:18: B025 try-except block with duplicate exception `TypeError`
   |
35 | except ValueError:
36 |     a = 2
37 | except (OSError, TypeError):
   |                  ^^^^^^^^^ B025
38 |     a = 2
   |

B025.py:44:9: B025 try-except* block with duplicate exception `ValueError`
   |
42 | except* ValueError:
43 |     a = 2
44 | except* ValueError:
   |         ^^^^^^^^^^ B025
45 |     a = 2
   |

B025.py:53:9: B025 try-except* block with duplicate exception `pickle.PickleError`
   |
51 | except* ValueError:
52 |     a = 2
53 | except* pickle.PickleError:
   |         ^^^^^^^^^^^^^^^^^^ B025
54 |     a = 2
   |

B025.py:60:9: B025 try-except* block with duplicate exception `ValueError`
   |
58 | except* (ValueError, TypeError):
59 |     a = 2
60 | except* ValueError:
   |         ^^^^^^^^^^ B025
61 |     a = 2
62 | except* (OSError, TypeError):
   |

B025.py:62:19: B025 try-except* block with duplicate exception `TypeError`
   |
60 | except* ValueError:
61 |     a = 2
62 | except* (OSError, TypeError):
   |                   ^^^^^^^^^ B025
63 |     a = 2
   |
