mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
parametrization: move comment, fix exception error msg (#5142)
This commit is contained in:
@@ -136,14 +136,14 @@ class DataResolver:
|
||||
except ContextError as exc:
|
||||
format_and_raise(exc, "'vars'", self.relpath)
|
||||
|
||||
# we wrap the definitions into ForeachDefinition and EntryDefinition,
|
||||
# that helps us to optimize, cache and selectively load each one of
|
||||
# them as we need, and simplify all of this DSL/parsing logic.
|
||||
# we use `tracked_vars` to keep a dictionary of used variables
|
||||
# by the interpolated entries.
|
||||
self.tracked_vars: Dict[str, Mapping] = {}
|
||||
|
||||
stages_data = d.get(STAGES_KWD, {})
|
||||
# we wrap the definitions into ForeachDefinition and EntryDefinition,
|
||||
# that helps us to optimize, cache and selectively load each one of
|
||||
# them as we need, and simplify all of this DSL/parsing logic.
|
||||
self.definitions: Dict[str, Definition] = {
|
||||
name: make_definition(self, name, definition)
|
||||
for name, definition in stages_data.items()
|
||||
|
||||
@@ -335,9 +335,9 @@ class Context(CtxDict):
|
||||
Defaults to False. Note that the default is different from
|
||||
`resolve`.
|
||||
"""
|
||||
key = normalize_key(key)
|
||||
normalized = normalize_key(key)
|
||||
try:
|
||||
node = super().select(key)
|
||||
node = super().select(normalized)
|
||||
except ValueError as exc:
|
||||
raise KeyNotInContext(key) from exc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user