TOOLS/gen-interface-changes: wrap long lines to 80 col

This commit is contained in:
llyyr 2024-05-26 15:10:43 +05:30 committed by Dudemanguy
parent 7aaa7b221f
commit c2968244e4
1 changed files with 5 additions and 2 deletions

View File

@ -22,6 +22,7 @@
import pathlib
import sys
import textwrap
from shutil import which
from subprocess import check_output
@ -41,8 +42,10 @@ def add_new_entries(docs_dir, out, git):
for file in files:
with open(file[0].resolve(), "r") as f:
for line in f:
line = " - " + line.rstrip()
out.write(line + "\n")
line = textwrap.fill(line.rstrip(), width=80,
initial_indent=" - ",
subsequent_indent=" ")
out.write(line + "\n")
if __name__ == "__main__":
if len(sys.argv) < 2: