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

Function main

misc/python/materialize/cli/fmt.py:22–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21
22def main() -> int:
23 parser = argparse.ArgumentParser(prog="fmt")
24 parser.add_argument("--check", action="store_true")
25 args = parser.parse_args()
26
27 tasks: list[tuple[str, TaskSpec]] = [
28 ("rustfmt", _rustfmt_fn(check=args.check)),
29 ("buf", _buf_cmd(check=args.check)),
30 ]
31
32 if not os.environ.get("MZDEV_NO_PYTHON"):
33 tasks += [
34 ("black", _black_cmd(check=args.check)),
35 ("ruff", _ruff_cmd(check=args.check)),
36 ("ruff-dbt", _ruff_dbt_cmd(check=args.check)),
37 ]
38
39 return 1 if run_parallel(tasks, spinner_suffix="formatters") else 0
40
41
42def _rustfmt_fn(*, check: bool):

Callers 1

fmt.pyFile · 0.70

Calls 7

run_parallelFunction · 0.90
_rustfmt_fnFunction · 0.85
_buf_cmdFunction · 0.85
_black_cmdFunction · 0.85
_ruff_cmdFunction · 0.85
_ruff_dbt_cmdFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected