MCPcopy Create free account
hub / github.com/mkdocstrings/griffe / main

Function main

scripts/make.py:287–342  ·  view source on GitHub ↗

Main entry point.

(args: list[str])

Source from the content-addressed store, hash-verified

285# Main ------------------------------------------------------------------------
286# -----------------------------------------------------------------------------
287def main(args: list[str]) -> int:
288 """Main entry point."""
289 if not args or args[0] == "help":
290 help(*args)
291 return 0
292
293 while args:
294 cmd = args.pop(0)
295
296 if cmd == "run":
297 if not args:
298 print("make: run: missing command", file=sys.stderr)
299 return 1
300 run(*args)
301 return 0
302
303 if cmd == "multirun":
304 if not args:
305 print("make: run: missing command", file=sys.stderr)
306 return 1
307 multirun(*args)
308 return 0
309
310 if cmd == "allrun":
311 if not args:
312 print("make: run: missing command", file=sys.stderr)
313 return 1
314 allrun(*args)
315 return 0
316
317 if cmd.startswith("3."):
318 if not args:
319 print("make: run: missing command", file=sys.stderr)
320 return 1
321 run3x(cmd, *args)
322 return 0
323
324 opts = []
325 while args and (args[0].startswith("-") or "=" in args[0]):
326 opts.append(args.pop(0))
327
328 if cmd == "clean":
329 clean()
330 elif cmd == "setup":
331 setup()
332 elif cmd == "vscode":
333 vscode()
334 elif cmd == "check":
335 multirun("duty", "check-quality", "check-types", "check-docs")
336 run("duty", "check-api")
337 elif cmd in {"check-quality", "check-docs", "check-types", "test"}:
338 multirun("duty", cmd, *opts)
339 else:
340 run("duty", cmd, *opts)
341
342 return 0
343
344

Callers 1

make.pyFile · 0.70

Calls 9

helpFunction · 0.85
runFunction · 0.85
multirunFunction · 0.85
allrunFunction · 0.85
run3xFunction · 0.85
cleanFunction · 0.85
setupFunction · 0.85
vscodeFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…