MCPcopy Index your code
hub / github.com/plotly/plotly.py / main

Function main

commands.py:504–539  ·  view source on GitHub ↗

Main driver.

()

Source from the content-addressed store, hash-verified

502
503
504def main():
505 """Main driver."""
506
507 project_root = os.path.dirname(os.path.realpath(__file__))
508 outdir = os.path.join(project_root, "plotly")
509
510 parser = make_parser()
511 args = parse_args(parser)
512
513 if args.cmd == "codegen":
514 perform_codegen(outdir, noformat=args.noformat)
515
516 elif args.cmd == "format":
517 reformat_code(outdir)
518
519 elif args.cmd == "lint":
520 lint_code(outdir)
521
522 elif args.cmd == "updateplotlyjsdev":
523 update_plotlyjs_dev(args, outdir)
524
525 elif args.cmd == "updateplotlyjs":
526 version = plotly_js_version()
527 print(version)
528 update_plotlyjs(version, outdir)
529
530 elif args.cmd == "bumpversion":
531 bump_version(args)
532
533 elif args.cmd is None:
534 parser.print_help()
535 sys.exit(1)
536
537 else:
538 print(f"unknown command {args.cmd}", file=sys.stderr)
539 sys.exit(1)
540
541
542if __name__ == "__main__":

Callers 1

commands.pyFile · 0.85

Calls 9

perform_codegenFunction · 0.90
reformat_codeFunction · 0.90
lint_codeFunction · 0.90
make_parserFunction · 0.85
parse_argsFunction · 0.85
update_plotlyjs_devFunction · 0.85
plotly_js_versionFunction · 0.85
update_plotlyjsFunction · 0.85
bump_versionFunction · 0.85

Tested by

no test coverage detected