From 47d9e993ce43c4238810a2533a81a24ee701f155 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Thu, 7 Mar 2024 15:09:22 +0100 Subject: Format: Run Black --- genexportsdoc.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'genexportsdoc.py') diff --git a/genexportsdoc.py b/genexportsdoc.py index ed538b2..dc32182 100755 --- a/genexportsdoc.py +++ b/genexportsdoc.py @@ -2,9 +2,9 @@ import subprocess -cmd=["go", "doc", "--all", "exports"] +cmd = ["go", "doc", "--all", "exports"] -output=subprocess.check_output(cmd).decode("utf-8") +output = subprocess.check_output(cmd).decode("utf-8") section = [""] package_doc = "" @@ -26,14 +26,17 @@ for out in output.splitlines(): if in_section: section[num] += line + def func_name(signature: str) -> str: idx = signature.index("(") - return signature[len("func "):idx] + return signature[len("func ") : idx] + def gen_toc(title: str) -> str: id = "-".join(title.lower().split(" ")) return f"[{title}](#{id})" + toc = "" first = True -- cgit v1.2.3