circuitpython/runtime.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
362 B
Python
Raw Normal View History

2022-05-27 15:59:54 -04:00
import pathlib
paths = pathlib.Path(".").glob("**/*.c")
translate_h = "#include \"supervisor/shared/translate/translate.h\""
for p in paths:
if "esp-idf" in p:
continue
lines = p.read_text().split("\n")
if "#include \"py/runtime.h\"" in lines and translate_h in lines:
lines.remove(translate_h)
p.write_text("\n".join(lines))