MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / gen_headers

Function gen_headers

tools/gen.py:151–161  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

149
150
151def gen_headers(headers):
152 out = io.StringIO()
153 out.write("# The file is autogenerated from aiohttp/hdrs.py\n")
154 out.write("# Run ./tools/gen.py to update it after the origin changing.")
155 out.write("\n\n")
156 out.write("from . import hdrs\n")
157 out.write("cdef tuple headers = (\n")
158 for hdr in headers:
159 out.write(" hdrs.{},\n".format(hdr.upper().replace("-", "_")))
160 out.write(")\n")
161 return out
162
163
164# print(gen(dct).getvalue())

Callers 1

gen.pyFile · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected