BLE001: detect contextlib.suppress ?
Open
needs-decision
rule
- Dominant language
- Rust
- Stars
- 49.6k
- Forks
- 2.4k
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 458
Description
```python
try:
foo()
except BaseException:
pass
```
is detected as `BLE001`, while the following isn't:
```python
with contextlib.suppress(BaseException):
foo()
```
please consider if that would make sense to detect it.
Contributor guide
Research direction
Start from Ruff's BLE001 rule and compare how the two Python examples are analyzed. Determine whether contextlib.suppress(BaseException) should be reported consistently with the try/except example, then add or update coverage so the intended behavior is explicit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100