Open CCP-Zeulix opened 1 month ago
Just discovered that this ONLY applies if unmaksed=True
which propegates down to as_dict
and runs:
return self._data if unmaksed else self._repr_dump(self._data)
...so self,_data
is returned "unchanged" instead of going through this method...
@classmethod
def _repr_dump(cls, cfg_map: dict):
d = {}
for k, v in cfg_map.items():
if isinstance(v, dict):
d[k] = cls._repr_dump(v)
elif isinstance(v, (str, bytes)) and cls._is_key_secret(k):
d[k] = '********'
else:
d[k] = v
return d
...which ensures that the end result is just a "plain-old-dict".
This code:
...printed this out in logs...
Note the top 4 lines. They're not suppose to be there.
I suspect this has something to do with the
_KwSafeEmptyDict
which extends theccptools.structs.EmptyDict
which extends thecollections.defaultdict
and how these "Dict-like" classes are structured in terms of YAML rendering.Also performing the
update(**kwargs)
method ofBasicConfig
seems to add more: