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

Function write_junit_xml

mypy/util.py:316–331  ·  view source on GitHub ↗
(
    dt: float,
    serious: bool,
    messages_by_file: dict[str | None, list[str]],
    path: str,
    version: str,
    platform: str,
)

Source from the content-addressed store, hash-verified

314
315
316def write_junit_xml(
317 dt: float,
318 serious: bool,
319 messages_by_file: dict[str | None, list[str]],
320 path: str,
321 version: str,
322 platform: str,
323) -> None:
324 xml = _generate_junit_contents(dt, serious, messages_by_file, version, platform)
325
326 # creates folders if needed
327 xml_dirs = os.path.dirname(os.path.abspath(path))
328 os.makedirs(xml_dirs, exist_ok=True)
329
330 with open(path, "wb") as f:
331 f.write(xml.encode("utf-8"))
332
333
334class IdMapper:

Callers 2

check_outputFunction · 0.90
emit_messagesFunction · 0.90

Calls 3

_generate_junit_contentsFunction · 0.85
encodeMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…