feat: remove return_values_not_error and only_default parameter
This commit is contained in:
parent
5759e4f86b
commit
92b5257e66
1 changed files with 5 additions and 14 deletions
|
|
@ -49,15 +49,12 @@ class UserDatas:
|
|||
self,
|
||||
user_datas: List[dict],
|
||||
*,
|
||||
return_values_not_error=False,
|
||||
user_datas_type: str = "user_datas",
|
||||
only_default: bool = False,
|
||||
):
|
||||
self.values = {}
|
||||
self.errors = []
|
||||
self.warnings = []
|
||||
self.show_secrets = False
|
||||
self.only_default = only_default
|
||||
if user_datas_type == "user_datas":
|
||||
self._populate_values(user_datas)
|
||||
else:
|
||||
|
|
@ -65,14 +62,11 @@ class UserDatas:
|
|||
self._auto_configure_dynamics()
|
||||
self._populate_config()
|
||||
self.properties_to_string = get_properties_to_string()
|
||||
if return_values_not_error:
|
||||
return self.values
|
||||
else:
|
||||
self._populate_error_warnings()
|
||||
return {
|
||||
"errors": self.errors,
|
||||
"warnings": self.warnings,
|
||||
}
|
||||
self._populate_error_warnings()
|
||||
return {
|
||||
"errors": self.errors,
|
||||
"warnings": self.warnings,
|
||||
}
|
||||
|
||||
def _populate_values(self, user_datas):
|
||||
for datas in user_datas:
|
||||
|
|
@ -215,9 +209,6 @@ class UserDatas:
|
|||
values_path = option.path(uncalculated=True)
|
||||
if values_path not in self.values:
|
||||
continue
|
||||
if self.only_default and option.owner.get() != owners.default:
|
||||
self.values.pop(values_path)
|
||||
continue
|
||||
options = self.values[values_path].get("options", {})
|
||||
if (
|
||||
options.get("allow_secrets_variables", True) is False
|
||||
|
|
|
|||
Loading…
Reference in a new issue