Closed airtonix closed 50 minutes ago
Consider we have such a YAML:
items: !include *.yaml
if all files match *.yaml
contain a Sequence at the top level in it, what parsed and loaded are:
items: [
[item, item, item, ...] # items of 1st file match *.yaml
[item, item, item, ...] # items of 2nd file match *.yaml
# ....
[item, item, item, ...] # items of n-th file match *.yaml
# ...
]
because YAML content of each matched file are treated as a list(sequence).
So i think, if a flatten
function was provided, like:
items: !include {urlpath: *.yaml, flattern: true}
we could get:
items: [
item 0 of 1st file, item 1 of 1st file, ... , item n of 1st file, # ...
item 0 of 2nd file, item 1 of 2nd file, ... , item n of 2nd file, # ...
# ....
item 0 of n-th file, item 1 of n-th file, ... , item n of n-th file, # ...
# ...
]
92f9223 is for the requirement.
It will be released later.
files:
{1,2,3,4}.yml
0.yml
expected output:
variations I've tried:
0a.yml