MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / main

Function main

misc/python/materialize/cli/gen-chroma-syntax.py:62–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def main() -> None:
63 parser = argparse.ArgumentParser()
64 parser.add_argument(
65 "--chroma-dir",
66 default="../chroma",
67 )
68 args = parser.parse_args()
69 lexer_dir = Path(f"{args.chroma_dir}/lexers/embedded/")
70 tree = ET.parse(lexer_dir / "postgresql_sql_dialect.xml")
71 root = tree.getroot()
72 if not root:
73 raise RuntimeError("Could not find root element")
74 set_keywords(root)
75 set_config(root)
76 ET.indent(root, " ")
77 tree.write(lexer_dir / "materialize_sql_dialect.xml", encoding="unicode")
78
79
80if __name__ == "__main__":

Callers 1

Calls 4

set_keywordsFunction · 0.85
set_configFunction · 0.85
parseMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected