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

Function do_daemon

mypy/dmypy/client.py:610–630  ·  view source on GitHub ↗

Serve requests in the foreground.

(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

608
609@action(daemon_parser)
610def do_daemon(args: argparse.Namespace) -> None:
611 """Serve requests in the foreground."""
612 # Lazy import so this import doesn't slow down other commands.
613 from mypy.dmypy_server import Server, process_start_options
614
615 if args.log_file:
616 sys.stdout = sys.stderr = open(args.log_file, "a", buffering=1)
617 fd = sys.stdout.fileno()
618 os.dup2(fd, 2)
619 os.dup2(fd, 1)
620
621 if args.options_data:
622 from mypy.options import Options
623
624 options_dict = pickle.loads(b64decode(args.options_data))
625 options_obj = Options()
626 options = options_obj.apply_changes(options_dict)
627 else:
628 options = process_start_options(args.flags, allow_sources=False)
629
630 Server(options, args.status_file, timeout=args.timeout).serve()
631
632
633@action(help_parser)

Callers

nothing calls this directly

Calls 6

apply_changesMethod · 0.95
OptionsClass · 0.90
process_start_optionsFunction · 0.90
ServerClass · 0.90
filenoMethod · 0.80
serveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…