Nice, I think kw_only=True and slots=True solve a lot of my dataclass problems. Wish they defaulted to true
While it doesn’t solve reading other people’s code with the defaults you’d like to have, dataclass being a decorator and not a special syntax means that you can just derive a new decorator from it with the defaults you want.
This could hurt basic static analysis.
That’s a good point. I know some of the python static analysis tools can “see through” some simple indirection, but don't know if even a simple wrapper injecting arguments would work with any (or which) of them for this purpose.