Using a programmatically generated type in type hints
For some external reasons I’m generating a set of dataclasses dynamically with make_dataclass
. In other parts of my codebase, I want to use these types in type hints. But both mypy
and pyright
complains.