Closed kosl closed 2 months ago
File "cli_base/toml_settings/api.py", line 81, in get_user_settings
document_changed = toml2dataclass(document=user_settings_doc, instance=self.settings_dataclass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "cli_base/toml_settings/deserialize.py", line 36, in toml2dataclass
changed = toml2dataclass(document=sub_doc, instance=field_value, _changed=_changed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "cli_base/toml_settings/deserialize.py", line 70, in toml2dataclass
elif not isinstance(field_value, type(doc_value.unwrap())):
^^^^^^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'unwrap'
released in: https://pypi.org/project/cli-base-utilities/0.10.2/
Still toggling the value is inert.
Hm. Sad. We have to fix that. Currently i have no project that used a boolean value ;)
Well, bool is not a showstopper as it can be mimicked by int 0/1.
It's now fixed in 0.10.3: https://pypi.org/project/cli-base-utilities/0.10.3/
If UserSettings contains bool value and when changed to non-default then (de)serialisation fails with AttributeError: 'bool' object has no attribute 'unwrap'.