David Peter
792f9e357e
[red-knot] Rename *_ty functions (#15617)
## Summary
General rules:
* Change the `_ty` suffix of all functions to `_type`.
* `_type_and_qualifiers` suffixes seem too long, so we ignore the
existence of qualifiers and still speak of "types"
* Functions only have a `_type` suffix if they return either `Type`,
`Option<Type>`, or `TypeAndQualifiers`
Free functions:
* `binding_ty` => `binding_type`
* `declaration_ty` => `declaration_type`
* `definition_expression_ty` => `definition_expression_type`
Methods:
* `CallDunderResult::return_ty` => `return_type`
* `NotCallableError::return_ty` => `return_type`
* `NotCallableError::called_ty` => `called_type`
* `TypeAndQualifiers::inner_ty` => `inner_type`
* `TypeAliasType::value_ty` => `value_type`
* `TypeInference::expression_ty` => `expression_type`
* `TypeInference::try_expression_ty` => `try_expression_type`
* `TypeInference::binding_ty` => `binding_type`
* `TypeInference::declaration_ty` => `declaration_type`
* `TypeInferenceBuilder::expression_ty` => `expression_type`
* `TypeInferenceBuilder::file_expression_ty` => `file_expression_type`
* `TypeInferenceBuilder::module_ty_from_name` => `module_type_from_name`
* `ClassBase::try_from_ty` => `try_from_type`
* `Parameter::annotated_ty` => `annotated_type`
* `Parameter::default_ty` => `default_type`
* `CallOutcome::return_ty` => `return_type`
* `CallOutcome::return_ty_result` => `return_type_result`
* `CallBinding::from_return_ty` => `from_return_type`
* `CallBinding::set_return_ty` => `set_return_type`
* `CallBinding::return_ty` => `return_type`
* `CallBinding::parameter_tys` => `parameter_types`
* `CallBinding::one_parameter_ty` => `one_parameter_type`
* `CallBinding::two_parameter_tys` => `two_parameter_types`
* `Unpacker::tuple_ty_elements` => `tuple_type_elements`
* `StringPartsCollector::ty` => `string_type`
Traits
* `HasTy` => `HasType`
* `HasTy::ty` => `inferred_type`
Test functions:
* `assert_public_ty` => `assert_public_type`
* `assert_scope_ty` => `assert_scope_type`
closes #15569
## Test Plan
—
2025-01-22 09:06:56 +01:00
..
2025-01-21 14:10:41 +00:00
2025-01-22 09:06:56 +01:00
2025-01-22 09:06:56 +01:00
2025-01-20 14:57:57 +01:00
2025-01-21 14:06:35 +01:00
2025-01-17 16:48:01 -08:00
2025-01-20 14:57:57 +01:00
2025-01-20 10:57:21 +01:00
2025-01-15 13:37:52 -05:00
2025-01-20 14:57:57 +01:00
2024-07-03 07:36:46 -05:00
2025-01-15 09:03:38 +01:00
2024-10-23 07:57:53 +02:00
2025-01-03 08:50:13 -06:00
2025-01-11 09:51:58 +01:00
2025-01-17 09:41:06 +01:00
2024-07-18 09:24:58 -07:00
2025-01-22 10:20:22 +05:30
2025-01-20 14:57:57 +01:00
2024-10-20 10:55:36 +02:00
2025-01-21 13:46:31 -05:00
2024-11-15 19:31:15 +01:00
2024-12-12 20:49:54 +01:00
2025-01-21 13:46:31 -05:00
2024-10-28 07:53:41 +00:00
2024-11-29 12:05:05 +00:00
2025-01-16 11:38:15 +05:30
2024-11-15 19:31:15 +01:00
2025-01-21 13:46:31 -05:00
2025-01-04 12:23:53 +01:00
2024-12-23 10:52:43 +01:00
2024-11-15 19:31:15 +01:00
2025-01-15 18:58:28 +05:30
2024-12-11 10:30:41 +00:00
2025-01-16 15:18:12 +01:00
2025-01-16 13:07:26 +00:00
2025-01-16 16:05:10 -06:00