Skip to content
Snippets Groups Projects
Commit 69e07f7b authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: use $ sign for in and out

parent 1937ca9a
No related branches found
No related tags found
2 merge requests!160STY: styling,!126Transformers
Pipeline #45674 passed
......@@ -446,7 +446,7 @@ class Converter(object, metaclass=ABCMeta):
match = SINGLE_VAR_RE.match(transformer["out"])
if match is None:
raise RuntimeError("'out' of the transformer definition must specify a single"
" variable name")
f" variable name. It was {transformer['out']}")
print(f"set {match.group('varname')} to {out_value}")
values[match.group('varname')] = out_value
......
......@@ -211,7 +211,7 @@ def create_transformer_registry(definition: dict):
}
# Load modules and associate classes:
for key, value in transformer_registry.items():
for key, value in transformer_def.items():
module = importlib.import_module(value["package"])
registry[key] = getattr(module, value["function"])
return registry
......
......@@ -11,7 +11,7 @@ RootDir:
transform:
MakeDayLong:
in: $day_short
out: day_long # no dollar sign here, because this is a variable name and no expression
out: $day_long
functions:
- ifelse: # name of the function
match: Mon # match is one specific argument
......@@ -21,7 +21,7 @@ RootDir:
then: Tuesday
TestSplit:
in: $day_short
out: day_split # no dollar sign here, because this is a variable name and no expression
out: $day_split
functions:
- split:
marker: o
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment