Open jfthuong opened 2 years ago
A vote for dataclasses from me. I'm not a huge fan of named tuples, and I don't mind the development dependency on Python 3.7. If it makes it easier, feel free to split the generation code out into its own module. It's a very monolithic script at the moment.
I love dataclasses (and also never really liked NamedTuple... always felt it was an alternative before dataclasses arrived)
@jfthuong, were you going to create a PR for this one?
It is hard to perform efficient code linting and typing with code like this in generate.py:
We could use instead either:
Dataclasses are easier to implement and add type hints, but they force compatibility to Python 3.7 and above (for this file at least, which is only used for dev).
Does it look like a fair suggestion?