mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:39:12 +00:00
many-to-one 6/9: Implement ruff_macros::map_codes
This commit is contained in:
parent
9eda286dcd
commit
c314e10e54
19 changed files with 505 additions and 271 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue