Start the server from command arguments and wait for it.
(args: argparse.Namespace, allow_sources: bool = False)
| 343 | |
| 344 | |
| 345 | def start_server(args: argparse.Namespace, allow_sources: bool = False) -> None: |
| 346 | """Start the server from command arguments and wait for it.""" |
| 347 | # Lazy import so this import doesn't slow down other commands. |
| 348 | from mypy.dmypy_server import daemonize, process_start_options |
| 349 | |
| 350 | start_options = process_start_options(args.flags, allow_sources) |
| 351 | if daemonize(start_options, args.status_file, timeout=args.timeout, log_file=args.log_file): |
| 352 | sys.exit(2) |
| 353 | wait_for_server(args.status_file) |
| 354 | |
| 355 | |
| 356 | def wait_for_server(status_file: str, timeout: float = 5.0) -> None: |
no test coverage detected
searching dependent graphs…