WIP: Expand the developer documentation #27

Draft
gremond wants to merge 226 commits from develop into developer_docs
Showing only changes of commit a70627db2b - Show all commits

View file

@ -307,7 +307,7 @@ class UserData:
if isinstance(value, list): if isinstance(value, list):
value = display_list(value, add_quote=True) value = display_list(value, add_quote=True)
else: else:
value = '"' + value + '"' value = '"' + str(value) + '"'
return value return value
def _populate_error_warnings(self): def _populate_error_warnings(self):
@ -318,14 +318,6 @@ class UserData:
option = self.config.forcepermissive.option(path) option = self.config.forcepermissive.option(path)
else: else:
option = self.config.option(path) option = self.config.option(path)
if option.issymlinkoption():
err = _('it\'s a symlink option so we cannot set the value {0}').format(self._display_value(option, value))
if self.invalid_user_data_error:
msg = _('{0}, it has been loading from {1}').format(err, options["source"])
else:
msg = _('{0}, it will be ignored when loading from {1}').format(err, options["source"])
self.unknowns.append({msg: option._subconfig})
continue
try: try:
if option.isoptiondescription(): if option.isoptiondescription():
if value: if value:
@ -343,6 +335,14 @@ class UserData:
): option._subconfig} ): option._subconfig}
) )
continue continue
if option.issymlinkoption():
err = _('it\'s a symlink option so we cannot set the value {0}').format(self._display_value(option, value))
if self.invalid_user_data_error:
msg = _('{0}, it has been loading from {1}').format(err, options["source"])
else:
msg = _('{0}, it will be ignored when loading from {1}').format(err, options["source"])
self.unknowns.append({msg: option._subconfig})
continue
except ConfigError as err: except ConfigError as err:
self.invalids.append({ self.invalids.append({
_("{0}, it has been loaded from {1}").format(err, options["source"]): option._subconfig} _("{0}, it has been loaded from {1}").format(err, options["source"]): option._subconfig}