mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
List changes for all ecosystem repos (#3461)
This commit is contained in:
parent
9858df1ac9
commit
6c576872d4
1 changed files with 19 additions and 9 deletions
|
@ -165,26 +165,36 @@ async def main(*, ruff1: Path, ruff2: Path) -> None:
|
|||
print()
|
||||
|
||||
for name, diff in diffs.items():
|
||||
print(f"<details><summary>{name}</summary>")
|
||||
print("<p>")
|
||||
print()
|
||||
|
||||
if isinstance(diff, Exception):
|
||||
changes = "error"
|
||||
print(f"<details><summary>{name} ({changes})</summary>")
|
||||
print("<p>")
|
||||
print()
|
||||
|
||||
print("```")
|
||||
print(str(diff))
|
||||
print("```")
|
||||
|
||||
print()
|
||||
print("</p>")
|
||||
print("</details>")
|
||||
elif diff:
|
||||
changes = f"+{len(diff.added)}, -{len(diff.removed)}"
|
||||
print(f"<details><summary>{name} ({changes})</summary>")
|
||||
print("<p>")
|
||||
print()
|
||||
|
||||
diff_str = "\n".join(diff)
|
||||
|
||||
print("```diff")
|
||||
print(diff_str)
|
||||
print("```")
|
||||
else:
|
||||
print("_No changes detected_.")
|
||||
|
||||
print()
|
||||
print("</p>")
|
||||
print("</details>")
|
||||
print()
|
||||
print("</p>")
|
||||
print("</details>")
|
||||
else:
|
||||
continue
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue