MCPcopy Index your code
hub / github.com/python/cpython / write_header

Function write_header

Tools/cases_generator/generators_common.py:66–75  ·  view source on GitHub ↗
(
    generator: str, sources: list[str], outfile: TextIO, comment: str = "//"
)

Source from the content-addressed store, hash-verified

64
65
66def write_header(
67 generator: str, sources: list[str], outfile: TextIO, comment: str = "//"
68) -> None:
69 outfile.write(
70 f"""{comment} This file is generated by {root_relative_path(generator)}
71{comment} from:
72{comment} {", ".join(root_relative_path(src) for src in sources)}
73{comment} Do not edit!
74"""
75 )
76
77
78def emit_to(out: CWriter, tkn_iter: TokenIterator, end: str) -> Token:

Callers 9

generate_opcode_headerFunction · 0.90
generate_uop_metadataFunction · 0.90
generate_opcode_metadataFunction · 0.90
generate_py_metadataFunction · 0.90
generate_uop_idsFunction · 0.90
generate_tier2Function · 0.90
generate_tier1Function · 0.90

Calls 3

root_relative_pathFunction · 0.85
writeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…