ruff/crates/ty_python_semantic/src
Alex Waygood 4a5715b97a
Some checks are pending
CI / cargo clippy (push) Blocked by required conditions
CI / cargo build (msrv) (push) Blocked by required conditions
CI / Determine changes (push) Waiting to run
CI / cargo fmt (push) Waiting to run
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 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 / Fuzz for new ty panics (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 / check playground (push) Blocked by required conditions
CI / benchmarks-instrumented (push) Blocked by required conditions
CI / benchmarks-walltime (push) Blocked by required conditions
[ty Playground] Release / publish (push) Waiting to run
[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
..
module_resolver [ty] Move search path resolution to Options::to_program_settings (#18937) 2025-06-25 18:00:38 +02:00
semantic_index [ty] Type narrowing in comprehensions (#18934) 2025-06-25 11:30:28 +02:00
types [ty] Reduce the overwhelming complexity of TypeInferenceBuilder::infer_call_expression (#18943) 2025-06-25 21:10:55 +01:00
util [ty] Homogeneous and mixed tuples (#18600) 2025-06-20 18:23:54 -04:00
ast_node_ref.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
db.rs [ty] Move search path resolution to Options::to_program_settings (#18937) 2025-06-25 18:00:38 +02:00
dunder_all.rs [ty] Add infrastructure for AST garbage collection (#18445) 2025-06-05 11:43:18 -04:00
lib.rs [ty] Move search path resolution to Options::to_program_settings (#18937) 2025-06-25 18:00:38 +02:00
lint.rs [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
list.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
module_name.rs [ty] Include imported sub-modules as attributes on modules for completions (#18898) 2025-06-23 12:48:16 -04:00
node_key.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
place.rs [ty] basic narrowing on attribute and subscript expressions (#17643) 2025-06-17 11:07:46 +02:00
program.rs [ty] Move search path resolution to Options::to_program_settings (#18937) 2025-06-25 18:00:38 +02:00
pull_types.rs [ty] Pull types on synthesized Python files created by mdtest (#18539) 2025-06-12 10:32:17 +01:00
python_platform.rs Hug closing } when f-string expression has a format specifier (#18704) 2025-06-17 07:39:42 +02:00
semantic_index.rs [ty] Use HashTable in PlaceTable (#18819) 2025-06-20 15:31:54 +02:00
semantic_model.rs [ty] Add completions for from module import <CURSOR> (#18830) 2025-06-23 10:43:25 -04:00
site_packages.rs [ty] Move search path resolution to Options::to_program_settings (#18937) 2025-06-25 18:00:38 +02:00
suppression.rs [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
types.rs [ty] eliminate is_fully_static (#18799) 2025-06-24 18:02:05 -07:00
unpack.rs [ty] Add infrastructure for AST garbage collection (#18445) 2025-06-05 11:43:18 -04:00