-
Notifications
You must be signed in to change notification settings - Fork 155
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
"Type[xxx]" has no attribute "from_json" #23
Comments
Hi, yes: I'd like this package to have full support for Without the above, But this is somewhat tangential to your code example / use case: Something like the following should be valid: from typing import Type, TypeVar
A = TypeVar('A')
DC = TypeVar('DC', bound=DataClassJsonMixin)
def dataclass_json(f: Type[A]) -> Type[DC]:
... The gist of the above is But Indeed, the state of typing in Python is not yet where I wish it were. |
Tracking in parent issue #31 |
One of the downsides of @dataclass_json is that mypy doesn't know about the extra
from_json
andto_json
methods. Any chance this can be supported, somehow?The docs seem to suggest there is a plugin system in mypy, albeit experimental: https://mypy.readthedocs.io/en/latest/extending_mypy.html#extending-mypy-using-plugins
The text was updated successfully, but these errors were encountered: