ruff/crates
Alex Waygood 4a5715b97a
[ty] Reduce the overwhelming complexity of `TypeInferenceBuilder::infer_call_expression` (#18943)
## Summary

This function is huge, and hugely indented. This PR breaks most of it
out into two helper functions: `KnownFunction::check_call()` and
`KnownClass::check_call`.

My immediate motivation is that we need to add yet more special cases to
this function in order to properly handle `tuple` instantiations and
instantiations of tuple subclasses. But I really don't relish the
thought of doing that with the function's current structure 😆

## Test Plan

Existing tests all pass. No new ones are added; this is a pure refactor
that should have no functional change.
2025-06-25 21:10:55 +01:00
..
ruff [ty] Move search path resolution to `Options::to_program_settings` (#18937) 2025-06-25 18:00:38 +02:00
ruff_annotate_snippets Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_benchmark [ty] Add Tanjun benchmark (#18850) 2025-06-21 18:29:02 +02:00
ruff_cache Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_db [ty] Rename `src.root` setting to `environment.root` (#18760) 2025-06-24 14:40:44 +02:00
ruff_dev Remove `Message::to_rule` (#18447) 2025-06-05 12:48:29 -04:00
ruff_diagnostics Add a `ViolationMetadata::rule` method (#18234) 2025-05-28 09:27:09 -04:00
ruff_formatter Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_graph [ty] Move search path resolution to `Options::to_program_settings` (#18937) 2025-06-25 18:00:38 +02:00
ruff_index Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_linter [`flake8-errmsg`] Extend `EM101` to support byte strings (#18867) 2025-06-25 10:53:56 -04:00
ruff_macros Apply fix availability and applicability when adding to `DiagnosticGuard` and remove `NoqaCode::rule` (#18834) 2025-06-24 10:08:36 -04:00
ruff_notebook Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_options_metadata [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ruff_python_ast [`ruff`] Trigger `RUF037` for empty string and byte strings (#18862) 2025-06-24 08:26:28 +02:00
ruff_python_ast_integration_tests [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
ruff_python_codegen Fix f-string interpolation escaping (#18882) 2025-06-25 10:04:15 +02:00
ruff_python_formatter [formatter] Fix missing blank lines before decorated classes in .pyi files (#18888) 2025-06-24 16:25:44 +02:00
ruff_python_index Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_literal Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_parser Disallow newlines in format specifiers of single quoted f- or t-strings (#18708) 2025-06-18 14:56:15 +02:00
ruff_python_semantic [`flake8-comprehensions`] Handle template strings for comprehension fixes (#18710) 2025-06-19 16:23:46 -05:00
ruff_python_stdlib Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_trivia Treat `ty: ` comments as pragma comments (#18532) 2025-06-07 16:02:43 +02:00
ruff_python_trivia_integration_tests Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_server Use file path for detecting package root (#18914) 2025-06-24 12:32:41 +00:00
ruff_source_file Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_text_size Add rustfmt.toml file (#18197) 2025-05-19 11:40:58 -04:00
ruff_wasm Unify `OldDiagnostic` and `Message` (#18391) 2025-06-19 09:37:58 -04:00
ruff_workspace Apply fix availability and applicability when adding to `DiagnosticGuard` and remove `NoqaCode::rule` (#18834) 2025-06-24 10:08:36 -04:00
ty [ty] Move search path resolution to `Options::to_program_settings` (#18937) 2025-06-25 18:00:38 +02:00
ty_ide [ty] Move search path resolution to `Options::to_program_settings` (#18937) 2025-06-25 18:00:38 +02:00
ty_project [ty] Move search path resolution to `Options::to_program_settings` (#18937) 2025-06-25 18:00:38 +02:00
ty_python_semantic [ty] Reduce the overwhelming complexity of `TypeInferenceBuilder::infer_call_expression` (#18943) 2025-06-25 21:10:55 +01:00
ty_server [ty] Enforce sort order of completions (#18917) 2025-06-24 11:31:08 -04:00
ty_test [ty] Move search path resolution to `Options::to_program_settings` (#18937) 2025-06-25 18:00:38 +02:00
ty_vendored [ty] eliminate is_fully_static (#18799) 2025-06-24 18:02:05 -07:00
ty_wasm [ty] Move search path resolution to `Options::to_program_settings` (#18937) 2025-06-25 18:00:38 +02:00