// superclass constructor, to see if there are arguments there that we should try to also
// constructor.
has_kwargs = False
for param in parameters.values():
if param.kind == param.VAR_KEYWORD:
has_kwargs = True
if has_kwargs:
// "mro" is "method resolution order". The first one is the current class, the next is the
// first superclass, and so on. Taking the first superclass should work in all cases that
// we"re looking for here.
After Change
// with multiple values for a single parameter (e.g., the default value gives you lazy=False
// for a dataset reader inside **kwargs, but a particular dataset reader actually hard-codes
// lazy=True - the superclass sees both lazy=True and lazy=False in its constructor).
if constructed_arg is not param.default:
kwargs[param_name] = constructed_arg
params.assert_empty(cls.__name__)
return kwargs