We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using code like:
@dataclass class MyDataclass: blah: int class MySerializer(DataclassSerializer[MyDataclass]): ...
mypy version 0.990 will display a warning like:
Type argument "MyDataclass" of "DataclassSerializer" must be a subtype of "Dataclass"
I am not yet sure whether this is a bug or intentional change, reported to mypy for clarification: python/mypy#14029
The text was updated successfully, but these errors were encountered:
Marking __dataclass_fields__ as a ClassVar in the protocol makes sense imo. It's unfortunate that older mypy doesn't accept that, though.
__dataclass_fields__
ClassVar
Sorry, something went wrong.
@oxan Are you fixing this or should I submit a PR?
I can commit a fix tomorrow.
27cd263
Successfully merging a pull request may close this issue.
When using code like:
mypy version 0.990 will display a warning like:
I am not yet sure whether this is a bug or intentional change, reported to mypy for clarification: python/mypy#14029
The text was updated successfully, but these errors were encountered: