-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly support self types in callable ClassVar (#14115)
Fixes #14108 This fixes both new and old style of working with self types. After all I fixed the new style by simply expanding self type, then `bind_self()` does its job, so effect on the instance will be the same. I had two options fixing this, other one (that I didn't go with) is making the callable generic in new style, if it appears in `ClassVar`. This however has two downsides: implementation is tricky, and this adds and edge case to an existing edge case. So instead I choose internal consistency within the new style, rather than similarity between old and new style.
- Loading branch information
1 parent
823667d
commit 401798f
Showing
3 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 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 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