many-to-one 6/9: Implement ruff_macros::map_codes

This commit is contained in:
Martin Fischer 2023-02-03 03:18:30 +01:00 committed by Charlie Marsh
parent 9eda286dcd
commit c314e10e54
19 changed files with 505 additions and 271 deletions

View file

@ -90,6 +90,17 @@ mod tests {
fp.write(line)
fp.write("\n")
text = ""
with (ROOT_DIR / "crates/ruff/src/codes.rs").open("r") as fp:
while (line := next(fp)).strip() != "// ruff":
text += line
text += " "*8 + f"// {plugin}\n"
text += line
text += fp.read()
with (ROOT_DIR / "crates/ruff/src/codes.rs").open("w") as fp:
fp.write(text)
if __name__ == "__main__":
parser = argparse.ArgumentParser(