How does one ignore extra arguments passed to a dataclass?
Cleaning the argument list before passing it to the constructor is probably the best way to go about it. I’d advice against writing your own __init__ function though, since the dataclass’ __init__ does a couple of other convenient things that you’ll lose by overriding it. Also, since the argument-cleaning logic is very tightly bound to … Read more