(self, popen_kwargs: dict[str, Any])
| 29 | file_type: str |
| 30 | |
| 31 | def configure_subprocess(self, popen_kwargs: dict[str, Any]) -> None: |
| 32 | match self.file_type: |
| 33 | case JsonFileType.UNIX_FD: |
| 34 | # Unix file descriptor |
| 35 | popen_kwargs['pass_fds'] = [self.file] |
| 36 | case JsonFileType.WINDOWS_HANDLE: |
| 37 | # Windows handle |
| 38 | # We run mypy with `--platform=linux` so it complains about this: |
| 39 | startupinfo = subprocess.STARTUPINFO() # type: ignore[attr-defined] |
| 40 | startupinfo.lpAttributeList = {"handle_list": [self.file]} |
| 41 | popen_kwargs['startupinfo'] = startupinfo |
| 42 | |
| 43 | @contextlib.contextmanager |
| 44 | def inherit_subprocess(self) -> Iterator[None]: |
no outgoing calls
no test coverage detected