global dummy entry vars
This commit is contained in:
parent
9623866ed9
commit
6cdd6764f6
1 changed files with 12 additions and 13 deletions
|
|
@ -73,16 +73,15 @@ def _override_variables(overrides: Overrides) -> Set[str]:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _entry_variables() -> Dict[str, str]:
|
_DUMMY_ENTRY_VARIABLES: Dict[str, str] = {
|
||||||
return {
|
name: to_variable_dependency_format_string(
|
||||||
name: to_variable_dependency_format_string(
|
# pylint: disable=protected-access
|
||||||
# pylint: disable=protected-access
|
script=BASE_SCRIPT,
|
||||||
script=BASE_SCRIPT,
|
parsed_format_string=BASE_SCRIPT._variables[name]
|
||||||
parsed_format_string=BASE_SCRIPT._variables[name]
|
# pylint: enable=protected-access
|
||||||
# pylint: enable=protected-access
|
)
|
||||||
)
|
for name in BASE_SCRIPT.variable_names
|
||||||
for name in BASE_SCRIPT.variable_names
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class VariableValidation:
|
class VariableValidation:
|
||||||
|
|
@ -106,12 +105,11 @@ class VariableValidation:
|
||||||
"""
|
"""
|
||||||
Do some gymnastics to initialize the Overrides script.
|
Do some gymnastics to initialize the Overrides script.
|
||||||
"""
|
"""
|
||||||
entry_variables = _entry_variables()
|
|
||||||
override_variables = _override_variables(overrides)
|
override_variables = _override_variables(overrides)
|
||||||
|
|
||||||
# Set resolved variables as all entry + override variables
|
# Set resolved variables as all entry + override variables
|
||||||
# at this point to generate every possible added/modified variable
|
# at this point to generate every possible added/modified variable
|
||||||
self.resolved_variables = set(entry_variables.keys()) | override_variables
|
self.resolved_variables = set(_DUMMY_ENTRY_VARIABLES.keys()) | override_variables
|
||||||
plugin_variables: Set[str] = set()
|
plugin_variables: Set[str] = set()
|
||||||
|
|
||||||
for (
|
for (
|
||||||
|
|
@ -148,10 +146,11 @@ class VariableValidation:
|
||||||
)
|
)
|
||||||
|
|
||||||
# copy the script and mock entry variables
|
# copy the script and mock entry variables
|
||||||
self.script = copy.deepcopy(overrides.script).add(entry_variables)
|
self.script = copy.deepcopy(overrides.script)
|
||||||
self.script.add(
|
self.script.add(
|
||||||
variables=_add_dummy_overrides(overrides=overrides)
|
variables=_add_dummy_overrides(overrides=overrides)
|
||||||
| _add_dummy_variables(variables=plugin_variables)
|
| _add_dummy_variables(variables=plugin_variables)
|
||||||
|
| _DUMMY_ENTRY_VARIABLES
|
||||||
)
|
)
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue