MCPcopy Index your code
hub / github.com/python/mypy / do_status

Function do_status

mypy/dmypy/client.py:419–437  ·  view source on GitHub ↗

Print daemon status. This verifies that it is responsive to requests.

(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

417
418@action(status_parser)
419def do_status(args: argparse.Namespace) -> None:
420 """Print daemon status.
421
422 This verifies that it is responsive to requests.
423 """
424 status = read_status(args.status_file)
425 if args.verbose:
426 show_stats(status)
427 # Both check_status() and request() may raise BadStatus,
428 # which will be handled by main().
429 check_status(status)
430 response = request(
431 args.status_file, "status", fswatcher_dump_file=args.fswatcher_dump_file, timeout=5
432 )
433 if args.verbose or "error" in response:
434 show_stats(response)
435 if "error" in response:
436 fail(f"Daemon may be busy processing; if this persists, consider {sys.argv[0]} kill")
437 print("Daemon is up and running")
438
439
440@action(stop_parser)

Callers

nothing calls this directly

Calls 6

read_statusFunction · 0.90
show_statsFunction · 0.85
check_statusFunction · 0.85
requestFunction · 0.85
printFunction · 0.85
failFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…