[ty] Improve check enforcing that an overloaded function must have an implementation#21978
Merged
AlexWaygood merged 1 commit intomainfrom Dec 15, 2025
Merged
[ty] Improve check enforcing that an overloaded function must have an implementation#21978AlexWaygood merged 1 commit intomainfrom
AlexWaygood merged 1 commit intomainfrom
Conversation
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
|
Member
Author
|
The primer report LGTM. Those pytest hits are all in an |
sharkdp
approved these changes
Dec 15, 2025
Contributor
sharkdp
left a comment
There was a problem hiding this comment.
Looks good to me — thank you.
dhruvmanila
approved these changes
Dec 15, 2025
dcreager
added a commit
that referenced
this pull request
Dec 15, 2025
* origin/main: Update MSRV to 1.90 (#21987) [ty] Improve check enforcing that an overloaded function must have an implementation (#21978) Update actions/checkout digest to 8e8c483 (#21982) [ty] Use `ParamSpec` without the attr for inferable check (#21934) [ty] Emit diagnostic when a type variable with a default is followed by one without a default (#21787) [ty] Fix callout syntax in configuration mkdocs (#1875) (#21961) Update debug_assert which pointed at missing method (#21969) [ty] Add support for `__qualname__` and other implicit class attributes (#21966)
dcreager
added a commit
that referenced
this pull request
Dec 15, 2025
* origin/main: Fluent formatting of method chains (#21369) [ty] Avoid stack overflow when calculating inferable typevars (#21971) [ty] Add "qualify ..." code fix for undefined references (#21968) [ty] Use jemalloc on linux (#21975) Update MSRV to 1.90 (#21987) [ty] Improve check enforcing that an overloaded function must have an implementation (#21978) Update actions/checkout digest to 8e8c483 (#21982) [ty] Use `ParamSpec` without the attr for inferable check (#21934) [ty] Emit diagnostic when a type variable with a default is followed by one without a default (#21787)
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
if TYPE_CHECKINGblocks the same as stub files (the feature requested in don't require overload implementation inTYPE_CHECKINGblock / treat them the same as stub files ty#1216)@abstractmethod-decorated methods to omit the implementation if they're methods in classes that have exactlyABCMetaas their metaclass. That seems wrong --@abstractmethodhas the same semantics if a class has a subclass ofABCMetaas its metaclass. This PR fixes that too. (I'm actually not totally sure we should care what the class's metaclass is at all -- see discussion in Emit diagnostic on constructor call to class with abstract methods ty#1877 (comment)... but the change this PR is making seems less wrong than what we have currently, anyway.)Fixes astral-sh/ty#1216
Test Plan
Mdtests and snapshots