File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,21 @@ def _constructor_envfile_variables(loader, node):
43
43
return new_value
44
44
45
45
46
+ def _constructor_tuple_variables (loader , node ):
47
+ """
48
+ Extracts the tuple variable from the node's value.
49
+ :param yaml.Loader loader: the yaml loader
50
+ :param node: the current node in the yaml
51
+ :return: value of the tuple
52
+ """
53
+ return tuple (loader .construct_sequence (node ))
54
+
55
+
46
56
TAG_ENV = "!ENV"
47
57
TAG_ENVFILE = "!ENVFILE"
58
+ TAG_TUPLE = "tag:yaml.org,2002:python/tuple"
48
59
49
60
50
61
_safe_loader .add_constructor (TAG_ENV , _constructor_env_variables )
51
62
_safe_loader .add_constructor (TAG_ENVFILE , _constructor_envfile_variables )
63
+ _safe_loader .add_constructor (TAG_TUPLE , _constructor_tuple_variables )
You can’t perform that action at this time.
0 commit comments