fix: load indefine if no default value

This commit is contained in:
egarette@silique.fr 2026-05-01 09:12:28 +02:00
parent b1368ec66f
commit ef58253dff
467 changed files with 3395 additions and 138 deletions

View file

@ -21,6 +21,7 @@ from pathlib import Path
from rougail.error import ExtensionError
from tiramisu.error import ValueOptionError, PropertiesOptionError, LeadershipError
from rougail.utils import undefined
from .i18n import _
from .__version__ import __version__
@ -137,7 +138,7 @@ class RougailUserDataYaml:
for val in value:
for key in keys:
values.setdefault(path + "." + key, []).append(
val.get(key, None)
val.get(key, undefined)
)
else:

View file

@ -1,19 +1,4 @@
{
"errors": [],
"warnings": [
[
[
"family \"family_disabled\" has property disabled, so cannot access to \"variable1\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_family.yaml\"",
"family_disabled.variable1",
null
]
],
[
[
"family \"family_disabled\" has property disabled, so cannot access to \"variable2\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/01_disabled_family.yaml\"",
"family_disabled.variable2",
null
]
]
]
"warnings": []
}

View file

@ -3,7 +3,7 @@
"warnings": [
[
[
"family \"family_disabled_hidden\" has property disabled and hidden, so cannot access to \"variable1\", it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/02_disabled_hidden_family.yaml\"",
"cannot modify the option \"variable1\" because is frozen, it will be ignored when loading from the YAML file \"/home/gnunux/git/stove/rougail-user-data-yaml/tests/errors/yaml/02_disabled_hidden_family.yaml\"",
"family_disabled_hidden.variable1",
null
]

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"proxy_mode",
null
]
]
]

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"proxy_mode",
null
]
]
]

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"proxy_mode",
null
]
]
]

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"proxy_mode",
null
]
]
]

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,12 @@
{
"errors": [],
"warnings": [
[
[
"the value \"1\" is an invalid string, it's not a string, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/001/config/03/config.yml\"",
"proxy_mode",
null
]
]
]
}

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"proxy_mode",
null
]
]
]

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"proxy_mode",
null
]
]
]

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "foo"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "foo"
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "foo"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "foo"
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "Manual proxy configuration"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "Manual proxy configuration"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,12 @@
{
"errors": [],
"warnings": [
[
[
"the value \"foo\" is an invalid choice, only \"Auto-detect proxy settings for this network\", \"Automatic proxy configuration URL\", \"Manual proxy configuration\", \"No proxy\" and \"Use system proxy settings\" are allowed, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/010/config/04/config.yml\"",
"proxy_mode",
null
]
]
]
}

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"manual.http_proxy.address",
null
]
]
]

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"manual.http_proxy.address",
null
]
]
]

View file

@ -0,0 +1,4 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net"
}

View file

@ -0,0 +1,4 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net"
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net"
}

View file

@ -0,0 +1,4 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net"
}

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"manual.http_proxy.address",
null
]
]
]

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"manual.http_proxy.address",
null
]
]
]

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"manual.http_proxy.address",
null
]
]
]

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"manual.http_proxy.address",
null
]
]
]

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,12 @@
{
"errors": [],
"warnings": [
[
[
"the value \"192.168.0.1\" is an invalid domain name, must not be an IP, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/030/config/02/config.yml\"",
"manual.http_proxy.address",
null
]
]
]
}

View file

@ -0,0 +1,12 @@
{
"errors": [],
"warnings": [
[
[
"the value \"not a valid domain name.com\" is an invalid domain name, must start with lowercase characters followed by lowercase characters, number, \"-\" and \".\" characters are allowed, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/030/config/03/config.yml\"",
"manual.http_proxy.address",
null
]
]
]
}

View file

@ -0,0 +1,4 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net"
}

View file

@ -0,0 +1,4 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net"
}

View file

@ -0,0 +1,4 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "192.168.0.1"
}

View file

@ -0,0 +1,4 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "192.168.0.1"
}

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"manual.http_proxy.address",
null
]
]
]

View file

@ -0,0 +1,9 @@
[
[
[
"mandatory variable but has no value",
"manual.http_proxy.address",
null
]
]
]

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,12 @@
{
"errors": [],
"warnings": [
[
[
"the value \"not a valid domain name.com\" is an invalid domain name, could be a IP, otherwise must start with lowercase characters followed by lowercase characters, number, \"-\" and \".\" characters are allowed, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/031/config/03/config.yml\"",
"manual.http_proxy.address",
null
]
]
]
}

View file

@ -0,0 +1,5 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "8080"
}

View file

@ -0,0 +1,5 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "8080"
}

View file

@ -0,0 +1,5 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "3128"
}

View file

@ -0,0 +1,5 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "3128"
}

View file

@ -0,0 +1,5 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "8080"
}

View file

@ -0,0 +1,5 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "8080"
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,12 @@
{
"errors": [],
"warnings": [
[
[
"the value \"100000\" is an invalid port, must be between 1 and 65535, it will be ignored when loading from the YAML file \"../rougail-tutorials_builder/examples/032/config/03/config.yml\"",
"manual.http_proxy.port",
null
]
]
]
}

View file

@ -0,0 +1,6 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "8080",
"manual.use_for_https": true
}

View file

@ -0,0 +1,6 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "8080",
"manual.use_for_https": true
}

View file

@ -0,0 +1,6 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "8080",
"manual.use_for_https": false
}

View file

@ -0,0 +1,6 @@
{
"proxy_mode": "No proxy",
"manual.http_proxy.address": "example.net",
"manual.http_proxy.port": "8080",
"manual.use_for_https": false
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,8 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "http.proxy.net",
"manual.http_proxy.port": "3128",
"manual.use_for_https": false,
"manual.https_proxy.address": "https.proxy.net",
"manual.https_proxy.port": "8080"
}

View file

@ -0,0 +1,8 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "http.proxy.net",
"manual.http_proxy.port": "3128",
"manual.use_for_https": false,
"manual.https_proxy.address": "https.proxy.net",
"manual.https_proxy.port": "8080"
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,8 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "http.proxy.net",
"manual.http_proxy.port": "3128",
"manual.use_for_https": false,
"manual.https_proxy.address": "https.proxy.net",
"manual.https_proxy.port": "3128"
}

View file

@ -0,0 +1,8 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "http.proxy.net",
"manual.http_proxy.port": "3128",
"manual.use_for_https": false,
"manual.https_proxy.address": "https.proxy.net",
"manual.https_proxy.port": "3128"
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "Manual proxy configuration"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "Manual proxy configuration"
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,4 @@
{
"errors": [],
"warnings": []
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,3 @@
{
"proxy_mode": "No proxy"
}

View file

@ -0,0 +1,8 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "http.proxy.net",
"manual.http_proxy.port": "3128",
"manual.use_for_https": false,
"manual.https_proxy.address": "http.proxy.net",
"manual.https_proxy.port": "3128"
}

View file

@ -0,0 +1,8 @@
{
"proxy_mode": "Manual proxy configuration",
"manual.http_proxy.address": "http.proxy.net",
"manual.http_proxy.port": "3128",
"manual.use_for_https": false,
"manual.https_proxy.address": "http.proxy.net",
"manual.https_proxy.port": "3128"
}

Some files were not shown because too many files have changed in this diff Show more