---
source: crates/ruff_linter/src/rules/flake8_simplify/mod.rs
---
SIM105 [*] Use `contextlib.suppress(ValueError)` instead of `try`-`except`-`pass`
  --> SIM105_2.py:10:1
   |
 9 |   # SIM105
10 | / try:
11 | |     foo()
12 | | except ValueError:
13 | |     pass
   | |________^
   |
help: Replace `try`-`except`-`pass` with `with contextlib.suppress(ValueError): ...`
   |
9  | # SIM105
   - try:
10 + with contextlib.suppress(ValueError):
11 |     foo()
   - except ValueError:
   -     pass
   |
note: This is an unsafe fix and may change runtime behavior
