Skip to content

Commit

Permalink
Rename variable according to suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
odelalleau committed Mar 15, 2021
1 parent bdec2aa commit d70a31f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions omegaconf/grammar_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
_config_key = f"({_id}|\\$)+" # foo, $bar, $foo$bar$
_node_path = f"(\\.)*({_config_key}(\\.{_config_key})*)?" # foo, .foo.$bar
_node_inter = f"\\${{\\s*{_node_path}\\s*}}" # node interpolation ${foo.bar}
_resolver_path = f"({_id}(\\.{_id})*)?" # foo, ns.bar3, ns_1.ns_2.b0z
_resolver_name = f"({_id}(\\.{_id})*)?" # foo, ns.bar3, ns_1.ns_2.b0z
_arg = "[a-zA-Z_0-9/\\-\\+.$%*@]+" # string representing a resolver argument
_args = f"{_arg}(\\s*,\\s*{_arg})*" # list of resolver arguments
_resolver_inter = f"\\${{\\s*{_resolver_path}\\s*:\\s*{_args}?\\s*}}" # ${foo:bar}
_resolver_inter = f"\\${{\\s*{_resolver_name}\\s*:\\s*{_args}?\\s*}}" # ${foo:bar}
_inter = f"({_node_inter}|{_resolver_inter})" # any kind of interpolation
_outer = "([^$]|\\$(?!{))+" # any character except $ (unless not followed by {)
SIMPLE_INTERPOLATION_PATTERN = re.compile(
Expand Down

0 comments on commit d70a31f

Please sign in to comment.