[ty] Repurpose FunctionType.into_bound_method_type to return BoundMethodType#19793
Merged
carljm merged 4 commits intoastral-sh:mainfrom Aug 6, 2025
Merged
[ty] Repurpose FunctionType.into_bound_method_type to return BoundMethodType#19793carljm merged 4 commits intoastral-sh:mainfrom
FunctionType.into_bound_method_type to return BoundMethodType#19793carljm merged 4 commits intoastral-sh:mainfrom
Conversation
Contributor
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
Contributor
|
Contributor
Author
|
Oh i didn't think that would have any effect |
FunctionType.into_bound_method_typeFunctionType.into_bound_method_type to return BoundMethodType
carljm
approved these changes
Aug 6, 2025
dcreager
added a commit
that referenced
this pull request
Aug 7, 2025
* origin/main: [ty] Implemented support for "rename" language server feature (#19551) [ty] Reduce size of member table (#19572) [ty] Move server capabilities creation (#19798) [ty] Repurpose `FunctionType.into_bound_method_type` to return `BoundMethodType` (#19793) [ty] Validate writes to `TypedDict` keys (#19782) [ty] Add support for using the test command emitted when a mdtest fails (#19794)
dcreager
added a commit
that referenced
this pull request
Aug 7, 2025
* dcreager/bound-typevar: (24 commits) more comment fix this isn't true anymore fix inner function in overload implementation ecosystem error Update Rust toolchain to 1.89 (#19807) [ty] Add `ty.inlayHints.variableTypes` server option (#19780) synthetic typevars for type materializations are bound [ty] Add failing tests for tuple subclasses (#19803) [ty] Add `ty.experimental.rename` server setting (#19800) clippy make BoundTypeVarInstance interned [ty] Implemented support for "rename" language server feature (#19551) [ty] Reduce size of member table (#19572) [ty] Move server capabilities creation (#19798) separate types! tmp allow KnownInstance::TypeVar in type expressions bind typevar in Generic/Protocol base class reference [ty] Repurpose `FunctionType.into_bound_method_type` to return `BoundMethodType` (#19793) remove unneeded GenericContext::with_binding_context create KnownInstanceType::TypeVar for PEP 695 too ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
As per our naming scheme (at least for callable types) this should return a
BoundMethodType, or be renamed, but it makes more sense to change the return type.I also ensure
ClassType.into_callablereturns aType::Callablein the changed branch.Ideally we could return a
CallableTypefrom theseinto_callablefunctions (and rename tointo_callable_typebut because of unions we cannot do this.