kadet
kadet copied to clipboard
Make BaseObj strict
Currently BaseObj accepts any keyword args, even ones not defined via self.need() or self.optional(). This means that any unknown keywords will blindly have no effect.
We should make BaseObj check keywords against the ones set in self.need and self.optional() and raise an Exception on unknown keywords.
And maybe do this via a new BaseObjStrict class, as the original BaseObj behaviour might be needed in some use cases (like passing keyword params via the inventory, where it's not ideal to hardcode all params via self.need() or self.optional().