One of the downsides of @dataclass_json is that mypy doesn't know about the extra from_json and to_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
@dataclass_json
@dataclass
class BulkApmm:
id: str
frequency_ms: int
pmms: List[Apmm]
...
bulk_apmm = BulkApmm.from_json(await request.text())
betslipdisp/views.py:70: error: "Type[BulkApmm]" has no attribute "from_json"
One of the downsides of @dataclass_json is that mypy doesn't know about the extra
from_jsonandto_jsonmethods. 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