mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 18:10:30 +00:00
|
Some checks are pending
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
CI / cargo clippy (push) Blocked by required conditions
CI / cargo test (linux) (push) Blocked by required conditions
CI / cargo test (linux, release) (push) Blocked by required conditions
CI / cargo test (windows) (push) Blocked by required conditions
CI / cargo test (wasm) (push) Blocked by required conditions
CI / cargo build (release) (push) Waiting to run
CI / cargo build (msrv) (push) Blocked by required conditions
CI / cargo fuzz build (push) Blocked by required conditions
CI / fuzz parser (push) Blocked by required conditions
CI / test scripts (push) Blocked by required conditions
CI / ecosystem (push) Blocked by required conditions
CI / cargo shear (push) Blocked by required conditions
CI / python package (push) Waiting to run
CI / pre-commit (push) Waiting to run
CI / mkdocs (push) Waiting to run
CI / formatter instabilities and black similarity (push) Blocked by required conditions
CI / test ruff-lsp (push) Blocked by required conditions
CI / benchmarks (push) Blocked by required conditions
## Summary Simplification follow-up to #15413. There's no need to have a dedicated `CallOutcome` variant for every known function, it's only necessary if the special-cased behavior of the known function includes emitting extra diagnostics. For `typing.cast`, there's no such need; we can use the regular `Callable` outcome variant, and update the return type according to the cast. (This is the same way we already handle `len`.) One reason to avoid proliferating unnecessary `CallOutcome` variants is that currently we have to explicitly add emitting call-binding diagnostics, for each outcome variant. So we were previously wrongly silencing any binding diagnostics on calls to `typing.cast`. Fixing this revealed a separate bug, that we were emitting a bogus error anytime more than one keyword argument mapped to a `**kwargs` parameter. So this PR also adds test and fix for that bug. ## Test Plan Existing `cast` tests pass unchanged, added new test for `**kwargs` bug. |
||
|---|---|---|
| .. | ||
| red_knot | ||
| red_knot_python_semantic | ||
| red_knot_server | ||
| red_knot_test | ||
| red_knot_vendored | ||
| red_knot_wasm | ||
| red_knot_workspace | ||
| ruff | ||
| ruff_benchmark | ||
| ruff_cache | ||
| ruff_db | ||
| ruff_dev | ||
| ruff_diagnostics | ||
| ruff_formatter | ||
| ruff_graph | ||
| ruff_index | ||
| ruff_linter | ||
| ruff_macros | ||
| ruff_notebook | ||
| ruff_python_ast | ||
| ruff_python_ast_integration_tests | ||
| ruff_python_codegen | ||
| ruff_python_formatter | ||
| ruff_python_index | ||
| ruff_python_literal | ||
| ruff_python_parser | ||
| ruff_python_resolver | ||
| ruff_python_semantic | ||
| ruff_python_stdlib | ||
| ruff_python_trivia | ||
| ruff_python_trivia_integration_tests | ||
| ruff_server | ||
| ruff_source_file | ||
| ruff_text_size | ||
| ruff_wasm | ||
| ruff_workspace | ||