ruff/crates/ruff_linter
Dimitri Papadopoulos Orfanos 1b4f7de840
[pyupgrade] Add resource.error as deprecated alias of OSError (UP024) (#17933)
## Summary

Partially addresses #17935.


[`resource.error`](https://docs.python.org/3/library/resource.html#resource.error)
is a deprecated alias of
[`OSError`](https://docs.python.org/3/library/exceptions.html#OSError).
> _Changed in version 3.3:_ Following [**PEP
3151**](https://peps.python.org/pep-3151/), this class was made an alias
of
[`OSError`](https://docs.python.org/3/library/exceptions.html#OSError).

Add it to the list of `OSError` aliases found by [os-error-alias
(UP024)](https://docs.astral.sh/ruff/rules/os-error-alias/#os-error-alias-up024).

## Test Plan

Sorry, I usually don't program in Rust. Could you at least point me to
the test I would need to modify?
2025-05-14 10:37:25 -04:00
..
resources [pyupgrade] Add resource.error as deprecated alias of OSError (UP024) (#17933) 2025-05-14 10:37:25 -04:00
src [pyupgrade] Add resource.error as deprecated alias of OSError (UP024) (#17933) 2025-05-14 10:37:25 -04:00
Cargo.toml Bump 0.11.9 (#17986) 2025-05-09 10:43:27 -05:00