Skip to content

Commit 5f3c3c4

Browse files
committed
delimiter bug fix.
1 parent 1b3ba3d commit 5f3c3c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extraction_methods/plugins/regex_rename.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class RegexRenameInput(Input):
4747
regex_swaps: list[RegexOutputKey] = Field(
4848
description="Regex and output key combinations.",
4949
)
50-
nest_delimiter: str = Field(
50+
delimiter: str = Field(
5151
default="",
5252
description="delimiter for nested term.",
5353
)
@@ -128,12 +128,12 @@ def rename(
128128
def run(self, body: dict[str, Any]) -> dict[str, Any]:
129129

130130
for swap in self.input.regex_swaps:
131-
nest = (
131+
key_parts = (
132132
swap.regex.split(self.input.delimiter)
133133
if self.input.delimiter
134134
else [swap.regex]
135135
)
136136

137-
body = self.rename(body, nest, swap.output_key)
137+
body = self.rename(body, key_parts, swap.output_key)
138138

139139
return body

0 commit comments

Comments
 (0)