-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support descriptors in dataclass transform (#15006)
Infer `__init__` argument types from the signatures of descriptor `__set__` methods, if present. We can't (easily) perform full type inference in a plugin, so we cheat and use a simplified implementation that should still cover most use cases. Here we assume that `__set__` is not decorated or overloaded, in particular. Fixes #14868.
- Loading branch information
Showing
2 changed files
with
269 additions
and
6 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