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

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

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

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

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

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

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

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