mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-13 22:06:42 +00:00
![]() ## Summary It can happen that we can't read a file (a python file, a jupyter notebook or pyproject.toml), which needs to be handled and handled consistently for all file types. Instead of using `Err` or `error!`, we emit E602 with the io error as message and continue. This PR makes sure we handle all three cases consistently, emit E602. I'm not convinced that it should be possible to disable io errors, but we now handle the regular case consistently and at least print warning consistently. I went with `warn!` but i can change them all to `error!`, too. It also checks the error case when a pyproject.toml is not readable. The error message is not very helpful, but it's now a bit clearer that actually ruff itself failed instead vs this being a diagnostic. ## Examples This is how an Err of `run` looks now: ![image]( |
||
---|---|---|
.. | ||
black_compatibility_test.rs | ||
integration_test.rs |