diff --git a/src/rougail/user_data_yaml/__init__.py b/src/rougail/user_data_yaml/__init__.py index ed5ff47..a25ff1e 100644 --- a/src/rougail/user_data_yaml/__init__.py +++ b/src/rougail/user_data_yaml/__init__.py @@ -54,7 +54,7 @@ class RougailUserDataYaml: def run( self, ) -> None: - self.yaml = YAML() + self.yaml = YAML(typ='safe', pure=True) user_datas = [] for idx, filename in enumerate(self.filenames): filename = Path(filename) diff --git a/tests/directory/result.txt b/tests/directory/result.txt new file mode 100644 index 0000000..76d03a9 --- /dev/null +++ b/tests/directory/result.txt @@ -0,0 +1,5 @@ +{ + "variable1": "value1", + "variable2": "value2", + "variable3": null +} \ No newline at end of file diff --git a/tests/directory/structure/rougail/file.yaml b/tests/directory/structure/rougail/file.yaml new file mode 100644 index 0000000..41ab39a --- /dev/null +++ b/tests/directory/structure/rougail/file.yaml @@ -0,0 +1,11 @@ +--- +version: 1.1 + +variable1: + mandatory: false + +variable2: + mandatory: false + +variable3: + mandatory: false diff --git a/tests/directory/yaml/file1.txt b/tests/directory/yaml/file1.txt new file mode 100644 index 0000000..59e9f17 --- /dev/null +++ b/tests/directory/yaml/file1.txt @@ -0,0 +1,2 @@ +--- +variable3: value3 diff --git a/tests/directory/yaml/file1.yaml b/tests/directory/yaml/file1.yaml new file mode 100644 index 0000000..2d6024c --- /dev/null +++ b/tests/directory/yaml/file1.yaml @@ -0,0 +1,2 @@ +--- +variable2: value2 diff --git a/tests/directory/yaml/file1.yml b/tests/directory/yaml/file1.yml new file mode 100644 index 0000000..6f1798d --- /dev/null +++ b/tests/directory/yaml/file1.yml @@ -0,0 +1,2 @@ +--- +variable1: value1 diff --git a/tests/results/00_2default_calculated_variable_description_multi_line/errors/all.json b/tests/results/00_2default_calculated_variable_description_multi_line/errors/all.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description_multi_line/errors/all.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description_multi_line/errors/mandatories.json b/tests/results/00_2default_calculated_variable_description_multi_line/errors/mandatories.json new file mode 100644 index 0000000..217db0a --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description_multi_line/errors/mandatories.json @@ -0,0 +1,4 @@ +{ + "errors": [], + "warnings": [] +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description_multi_line/file/all.yml b/tests/results/00_2default_calculated_variable_description_multi_line/file/all.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description_multi_line/file/all.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description_multi_line/file/all_exclude.yml b/tests/results/00_2default_calculated_variable_description_multi_line/file/all_exclude.yml new file mode 100644 index 0000000..cc33587 --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description_multi_line/file/all_exclude.yml @@ -0,0 +1,7 @@ +{ + "rougail": { + "var1": "string1", + "var2": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description_multi_line/file/mandatories.yml b/tests/results/00_2default_calculated_variable_description_multi_line/file/mandatories.yml new file mode 100644 index 0000000..1f0827e --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description_multi_line/file/mandatories.yml @@ -0,0 +1,6 @@ +{ + "rougail": { + "var1": "string1", + "var3": "string1" + } +} \ No newline at end of file diff --git a/tests/results/00_2default_calculated_variable_description_multi_line/makedict/all.json b/tests/results/00_2default_calculated_variable_description_multi_line/makedict/all.json new file mode 100644 index 0000000..2fbf52f --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description_multi_line/makedict/all.json @@ -0,0 +1,5 @@ +{ + "rougail.var1": "string1", + "rougail.var2": "string1", + "rougail.var3": "string1" +} diff --git a/tests/results/00_2default_calculated_variable_description_multi_line/makedict/mandatories.json b/tests/results/00_2default_calculated_variable_description_multi_line/makedict/mandatories.json new file mode 100644 index 0000000..2fbf52f --- /dev/null +++ b/tests/results/00_2default_calculated_variable_description_multi_line/makedict/mandatories.json @@ -0,0 +1,5 @@ +{ + "rougail.var1": "string1", + "rougail.var2": "string1", + "rougail.var3": "string1" +}