MDPOW
MDPOW copied to clipboard
Obscure TypeError when supplying unused kwargs to `Gsolv`
Additional kwargs get passed to the super() class, which is Journalled. Journalled then passes them on to object, from which it inherits. This results in a slightly obscure error:
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
It may be better to check for any extra keyword arguments in Journalled.__init__(), replacing the super().__init__() call.
Yes, make sense.
I think when I wrote this a log time ago I was only slowly learning how to do class inheritance and using super() and friends was still a bit mystifying. There's definitely room for improvement!
Also, I don't think that the "restarting" code is particularly well tested. It seemed like a good idea at the time to make it convenient to restart, but I don't think I was a strong believer in tests then :-(.