You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug parse_config() uses this code to decide which YAML entries to actually look at: loader.add_implicit_resolver(tag, pattern, None) The third parameter, first, is intentionally set to None. However, if one takes a look at the YAML documentation, this exact argument controls whether a YAML entry should be looked at.
And indeed, it does not matter which value is passed as tag, as it will only be used to tag the entries and process them. But all entries will be processed, prefixed with the tag or not. As soon as first is also set to the value of tag, things start to work as expected: loader.add_implicit_resolver(tag, pattern, tag)
To Reproduce
Steps to reproduce the behavior:
Add a prefixed and a non-prefixed environment variable substitution attempt to a YAML file, e. g.:
@frank-straetz many thanks for the detailed issue and for pinpointing the cause. loader.add_implicit_resolver(tag, pattern, first=[tag]) works as expected and parses only the lines that have a tag prefix.
Describe the bug
parse_config()
uses this code to decide which YAML entries to actually look at:loader.add_implicit_resolver(tag, pattern, None)
The third parameter,first
, is intentionally set toNone
. However, if one takes a look at the YAML documentation, this exact argument controls whether a YAML entry should be looked at.And indeed, it does not matter which value is passed as
tag
, as it will only be used to tag the entries and process them. But all entries will be processed, prefixed with thetag
or not. As soon asfirst
is also set to the value oftag
, things start to work as expected:loader.add_implicit_resolver(tag, pattern, tag)
To Reproduce
Steps to reproduce the behavior:
parse_config()
on this YAML file, withtag
set to different values as well asNone
.first
set and thepattern
matches.Expected behavior
Only the entries prefixed with the
tag
should be acted upon.Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: