MCPcopy Create free account
hub / github.com/pytorch/tutorials / main

Function main

tools/linter/adapters/run_from_link.py:56–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55
56def main() -> None:
57 args = parse_args()
58
59 location = REPO_ROOT / ".lintbin" / "from_link" / "adapters"
60 location.mkdir(parents=True, exist_ok=True)
61
62 if args.lint_link:
63 download_file(args.lint_link, location / args.lint_name)
64
65 if args.init_link:
66 download_file(args.init_link, location / args.init_name)
67
68 if args.run_init:
69 # Save the content to a file named after the name argument
70 subprocess_args = ["python3", location / args.init_name] + args.args_for_file
71 subprocess.run(subprocess_args, check=True)
72 if args.run_lint:
73 subprocess_args = ["python3", location / args.lint_name] + args.args_for_file
74 subprocess.run(
75 subprocess_args,
76 check=True,
77 )
78
79
80if __name__ == "__main__":

Callers 1

run_from_link.pyFile · 0.70

Calls 3

download_fileFunction · 0.85
runMethod · 0.80
parse_argsFunction · 0.70

Tested by

no test coverage detected