MCPcopy Create free account
hub / github.com/ezyang/ghstack / emit

Method emit

test_shell.py:40–49  ·  view source on GitHub ↗
(self, *payload: ConsoleMsg, **kwargs: Any)

Source from the content-addressed store, hash-verified

38 logging.getLogger("asyncio").setLevel(logging.WARNING)
39
40 def emit(self, *payload: ConsoleMsg, **kwargs: Any) -> ghstack.shell._SHELL_RET:
41 args: List[str] = [sys.executable, "emitter.py"]
42 for p in payload:
43 if isinstance(p, out):
44 args.extend(("o", p.msg))
45 elif isinstance(p, err):
46 args.extend(("e", p.msg))
47 elif isinstance(p, big_dump):
48 args.extend(("r", "-"))
49 return self.sh.sh(*args, **kwargs)
50
51 def flog(self, cm: "unittest._AssertLogsContext") -> str: # type: ignore[name-defined]
52 def redact(s: str) -> str:

Callers 7

test_stdoutMethod · 0.95
test_stderrMethod · 0.95
test_stdout_passthruMethod · 0.95
test_deadlockMethod · 0.95
test_uses_raw_fdMethod · 0.95

Calls 1

shMethod · 0.80

Tested by

no test coverage detected