mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
parametrization: disable set keyword (#5063)
This commit is contained in:
@@ -313,6 +313,7 @@ class DataResolver:
|
||||
|
||||
@classmethod
|
||||
def set_context_from(cls, context: Context, to_set, source=None):
|
||||
# NOTE: `set` is disabled in the schema
|
||||
try:
|
||||
for key, value in to_set.items():
|
||||
src_set = [*(source or []), key]
|
||||
|
||||
+1
-3
@@ -3,7 +3,7 @@ from voluptuous import Any, Optional, Required, Schema
|
||||
from dvc import dependency, output
|
||||
from dvc.hash_info import HashInfo
|
||||
from dvc.output import CHECKSUMS_SCHEMA, BaseOutput
|
||||
from dvc.parsing import DO_KWD, FOREACH_KWD, SET_KWD, VARS_KWD
|
||||
from dvc.parsing import DO_KWD, FOREACH_KWD, VARS_KWD
|
||||
from dvc.stage.params import StageParams
|
||||
|
||||
STAGES = "stages"
|
||||
@@ -64,7 +64,6 @@ VARS_SCHEMA = [str, dict]
|
||||
|
||||
STAGE_DEFINITION = {
|
||||
StageParams.PARAM_CMD: Any(str, list),
|
||||
Optional(SET_KWD): dict,
|
||||
Optional(StageParams.PARAM_WDIR): str,
|
||||
Optional(StageParams.PARAM_DEPS): [str],
|
||||
Optional(StageParams.PARAM_PARAMS): [Any(str, dict)],
|
||||
@@ -81,7 +80,6 @@ STAGE_DEFINITION = {
|
||||
}
|
||||
|
||||
FOREACH_IN = {
|
||||
Optional(SET_KWD): dict,
|
||||
Required(FOREACH_KWD): Any(dict, list, str),
|
||||
Required(DO_KWD): STAGE_DEFINITION,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user