-
Notifications
You must be signed in to change notification settings - Fork 302
Adapt and clarify tests and docs around explicitly annotated receiver parameters #2363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| conformance_automated = "Fail" | ||
| conformant = "Partial" | ||
| notes = """ | ||
| Only partially supports `@property` protocol members. | ||
| Does not reject incompatible non-generic implementations of generic protocol methods. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cross reference: astral-sh/ty#2323
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think astral-sh/ty#2924 is the better reference here; astral-sh/ty#2323 is specifically discussing unsoundness of |
||
| """ | ||
| errors_diff = """ | ||
| Line 144: Unexpected errors ['protocols_generic.py:144:25: error[invalid-assignment] Object of type `ConcreteHasProperty1` is not assignable to `HasPropertyProto`'] | ||
| Line 153: Expected 1 errors | ||
| """ | ||
| output = """ | ||
| protocols_generic.py:40:24: error[invalid-assignment] Object of type `Concrete1` is not assignable to `Proto1[int, str]` | ||
|
|
@@ -13,8 +13,6 @@ protocols_generic.py:56:20: error[invalid-assignment] Object of type `Box[float] | |
| protocols_generic.py:66:25: error[invalid-assignment] Object of type `Sender[int]` is not assignable to `Sender[float]` | ||
| protocols_generic.py:74:28: error[invalid-assignment] Object of type `AttrProto[int]` is not assignable to `AttrProto[float]` | ||
| protocols_generic.py:75:26: error[invalid-assignment] Object of type `AttrProto[float]` is not assignable to `AttrProto[int]` | ||
| protocols_generic.py:144:25: error[invalid-assignment] Object of type `ConcreteHasProperty1` is not assignable to `HasPropertyProto` | ||
| protocols_generic.py:145:25: error[invalid-assignment] Object of type `ConcreteHasProperty2` is not assignable to `HasPropertyProto` | ||
| protocols_generic.py:146:25: error[invalid-assignment] Object of type `ConcreteHasProperty3` is not assignable to `HasPropertyProto` | ||
| protocols_generic.py:147:25: error[invalid-assignment] Object of type `ConcreteHasProperty4` is not assignable to `HasPropertyProto` | ||
| protocols_generic.py:133:26: error[invalid-assignment] Object of type `InvalidParentProperty` is not assignable to `HasParentProperty` | ||
| protocols_generic.py:185:23: error[invalid-assignment] Object of type `InvalidGreaterThan` is not assignable to `HasGreaterThan` | ||
| """ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a ty maintainer. This description was outdated.
I am not making this change to make ty look better on the conformance tests. By disentangling the different aspects of the previous
ConcreteHasProperty*tests, we just isolate the deficiency of ty more clearly.