Dataclass field that contains a descriptor object isn't handled correctly #3245
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
If a
@dataclass
field is initialized with a descriptor as a default value, pyright should use the value type of the__set__
method for the descriptor when determining the type of the corresponding parameter within the synthesized__init__
method.Types are also evaluated incorrectly in this case.
Note that mypy also exhibits these same bugs.
The text was updated successfully, but these errors were encountered: