-
Notifications
You must be signed in to change notification settings - Fork 290
Allow errors for unsound Self definitions on non-final classes #2221
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
Open
davidhalter
wants to merge
6
commits into
python:main
Choose a base branch
from
davidhalter:allow-unsound-error-self-classvar
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+44
−55
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
82ad890
Allow errors for unsound Self definitions on non-final classes
davidhalter 0b6a395
Merge remote-tracking branch 'origin/main' into allow-unsound-error-s…
davidhalter 41d15d5
Update zuban and run results
davidhalter cd0cee6
Upgrade zuban in uv lock
davidhalter ae0d7a1
Rerun mypy conformance tests
davidhalter ac4622f
Allow type checkers to generate an error when list[Self] instance var…
davidhalter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,13 @@ | ||
| conformance_automated = "Fail" | ||
| conformant = "Partial" | ||
| notes = """ | ||
| Does not synthesize a `__hash__ = None` class attribute for unhashable dataclasses. | ||
| """ | ||
| conformance_automated = "Pass" | ||
| errors_diff = """ | ||
| Line 14: Unexpected errors ['dataclasses_hash.py:14: error: Expression is of type "Callable[[object], int]", not "None" [misc]'] | ||
| Line 36: Unexpected errors ['dataclasses_hash.py:36: error: Expression is of type "Callable[[object], int]", not "None" [misc]'] | ||
| """ | ||
| output = """ | ||
| dataclasses_hash.py:14: error: Expression is of type "Callable[[object], int]", not "None" [misc] | ||
| dataclasses_hash.py:17: error: "DC1" has no attribute "__hash__" [attr-defined] | ||
| dataclasses_hash.py:17: error: "None" not callable [operator] | ||
| dataclasses_hash.py:18: error: Incompatible types in assignment (expression has type "DC1", variable has type "Hashable") [assignment] | ||
| dataclasses_hash.py:36: error: Expression is of type "Callable[[object], int]", not "None" [misc] | ||
| dataclasses_hash.py:39: error: "DC3" has no attribute "__hash__" [attr-defined] | ||
| dataclasses_hash.py:18: note: Following member(s) of "DC1" have conflicts: | ||
| dataclasses_hash.py:18: note: __hash__: expected "Callable[[], int]", got "None" | ||
| dataclasses_hash.py:39: error: "None" not callable [operator] | ||
| dataclasses_hash.py:40: error: Incompatible types in assignment (expression has type "DC3", variable has type "Hashable") [assignment] | ||
| dataclasses_hash.py:40: note: Following member(s) of "DC3" have conflicts: | ||
| dataclasses_hash.py:40: note: __hash__: expected "Callable[[], int]", got "None" | ||
| """ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,6 @@ | ||
| conformant = "Partial" | ||
| notes = """ | ||
| Doesn't allow accessing `Self` in a classmethod | ||
| """ | ||
| conformance_automated = "Fail" | ||
| conformance_automated = "Pass" | ||
| errors_diff = """ | ||
| Line 43: Unexpected errors ['generics_self_advanced.py:43: error: Access to generic instance variables via class is ambiguous [misc]'] | ||
| Line 44: Unexpected errors ['generics_self_advanced.py:44: error: Access to generic instance variables via class is ambiguous [misc]'] | ||
| """ | ||
| output = """ | ||
| generics_self_advanced.py:43: error: Access to generic instance variables via class is ambiguous [misc] | ||
| generics_self_advanced.py:44: error: Access to generic instance variables via class is ambiguous [misc] | ||
| generics_self_advanced.py:48: error: Access to generic instance variables via class is ambiguous [misc] | ||
| """ |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| version = "zuban 0.6.1" | ||
| version = "zuban 0.6.2" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.