This commit is contained in:
Patrick von Platen 2022-07-19 23:14:03 +00:00
parent 936cd08488
commit 1f49a343b5
1 changed files with 3 additions and 1 deletions

View File

@ -208,7 +208,9 @@ class ConfigMixin:
def extract_init_dict(cls, config_dict, **kwargs):
expected_keys = set(dict(inspect.signature(cls.__init__).parameters).keys())
expected_keys.remove("self")
expected_keys.remove("kwargs")
# remove general kwargs if present in dict
if "kwargs" in expected_keys:
expected_keys.remove("kwargs")
init_dict = {}
for key in expected_keys:
if key in kwargs: