Replace the VEX snippet on an existing wrangle and re-validate.
(self, path, vex_code, validate=True)
| 836 | } |
| 837 | |
| 838 | def set_wrangle_code(self, path, vex_code, validate=True): |
| 839 | """Replace the VEX snippet on an existing wrangle and re-validate.""" |
| 840 | node = self._resolve_node(path) |
| 841 | snippet = node.parm("snippet") |
| 842 | if snippet is None: |
| 843 | raise ValueError(f"{path} has no 'snippet' parameter (not a wrangle)") |
| 844 | snippet.set(vex_code) |
| 845 | result = {"path": node.path(), "code_length": len(vex_code)} |
| 846 | if validate: |
| 847 | result["validation"] = self._cook_and_report(node) |
| 848 | return result |
| 849 | |
| 850 | # ------------------------------------------------------------------------- |
| 851 | # Geometry Introspection |
nothing calls this directly
no test coverage detected