Skip to content

Commit

Permalink
Allow patch constant to patch type like Option<T> and to replace comp…
Browse files Browse the repository at this point in the history
…uted values
  • Loading branch information
sydhds committed May 14, 2024
1 parent d05a21f commit b1a4cb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion massa_test_framework/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def apply(self, root=Path, strip: int = 0, fuzz: bool = False):
with open(root / self.constant_file, "r+") as fp:
content = fp.read()
content_sub = re.sub(
f"(pub )?const {self.constant_name}: (\w+) = (\w+);",
f"(pub )?const {self.constant_name}: ([\w\<\>]+) = ([\w\s\*\(\)]+);",
f"\g<1>const {self.constant_name}: \g<2> = {self.new_value};",
content,
)
Expand Down

0 comments on commit b1a4cb6

Please sign in to comment.