mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 07:04:53 +00:00
![]() Minor follow-up to https://github.com/astral-sh/ruff/pull/16161 This `not_callable` flag wasn't functional, because it could never be `false`. It was initialized to `true` and then only ever updated with `|=`, which can never make it `false`. Add a test that exercises the case where it _should_ be `false` (all of the union elements are callable) but `bindings` is also empty (all union elements have binding errors). Before this PR, the added test wrongly emits a diagnostic that the union `Literal[f1] | Literal[f2]` is not callable. And add a test where a union call results in one binding error and one not-callable error, where we currently give the wrong result (we show only the binding error), with a TODO. Also add TODO comments in a couple other tests where ideally we'd report more than just one error out of a union call. Also update the flag name to `all_errors_not_callable` to more clearly indicate the semantics of the flag. |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml | ||
mdtest.py | ||
mdtest.py.lock |