(headers)
| 149 | |
| 150 | |
| 151 | def 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()) |