Skip to content

Commit 4b30b8b

Browse files
authored
parametrization: move comment, fix exception error msg (#5142)
1 parent 5db7a4c commit 4b30b8b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dvc/parsing/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ def __init__(self, repo: "Repo", wdir: PathInfo, d: dict):
136136
except ContextError as exc:
137137
format_and_raise(exc, "'vars'", self.relpath)
138138

139-
# we wrap the definitions into ForeachDefinition and EntryDefinition,
140-
# that helps us to optimize, cache and selectively load each one of
141-
# them as we need, and simplify all of this DSL/parsing logic.
142139
# we use `tracked_vars` to keep a dictionary of used variables
143140
# by the interpolated entries.
144141
self.tracked_vars: Dict[str, Mapping] = {}
145142

146143
stages_data = d.get(STAGES_KWD, {})
144+
# we wrap the definitions into ForeachDefinition and EntryDefinition,
145+
# that helps us to optimize, cache and selectively load each one of
146+
# them as we need, and simplify all of this DSL/parsing logic.
147147
self.definitions: Dict[str, Definition] = {
148148
name: make_definition(self, name, definition)
149149
for name, definition in stages_data.items()

dvc/parsing/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,9 @@ def select(
335335
Defaults to False. Note that the default is different from
336336
`resolve`.
337337
"""
338-
key = normalize_key(key)
338+
normalized = normalize_key(key)
339339
try:
340-
node = super().select(key)
340+
node = super().select(normalized)
341341
except ValueError as exc:
342342
raise KeyNotInContext(key) from exc
343343

0 commit comments

Comments
 (0)