Skip to content

Commit ee2e0c5

Browse files
committed
feat: Add usable-by label to raw functions
1 parent 9711ff1 commit ee2e0c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/api/compiler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,10 @@ def start(format: bool = False):
444444
function_docs = docs["method"].get(c.qualname, None)
445445

446446
if function_docs:
447-
docstring += function_docs["desc"] + "\n"
447+
docstring += function_docs.get("desc", "").strip() + "\n"
448+
449+
if function_docs.get("usable-by", "") != "":
450+
docstring += "\n .. include:: /_includes/usable-by/" + function_docs["usable-by"] + ".rst\n "
448451
else:
449452
docstring += f"Telegram API function."
450453

0 commit comments

Comments
 (0)