mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 23:46:17 +01:00
Merge branch 'ebassi/rst-codegen-fixes' into 'main'
Generate missing docs for out arguments See merge request GNOME/glib!3553
This commit is contained in:
commit
b35e70a701
@ -120,12 +120,12 @@ class RstCodeGenerator:
|
||||
def _generate_section(self, title, name):
|
||||
"""Generates a section with the given title."""
|
||||
res = [
|
||||
f".. _{name} {title}:",
|
||||
"",
|
||||
"-" * len(title),
|
||||
title,
|
||||
"-" * len(title),
|
||||
"",
|
||||
f".. {name} {title}:",
|
||||
"",
|
||||
"",
|
||||
]
|
||||
return "\n".join(res)
|
||||
@ -142,6 +142,8 @@ class RstCodeGenerator:
|
||||
else:
|
||||
access = "readable"
|
||||
res += [
|
||||
".. _{title}:",
|
||||
"",
|
||||
title,
|
||||
"^" * len(title),
|
||||
"",
|
||||
@ -216,6 +218,8 @@ class RstCodeGenerator:
|
||||
for m in iface.methods:
|
||||
title = f"{iface.name}.{m.name}"
|
||||
res += [
|
||||
".. _{title}:",
|
||||
"",
|
||||
title,
|
||||
"^" * len(title),
|
||||
"",
|
||||
@ -231,6 +235,13 @@ class RstCodeGenerator:
|
||||
f" {arg_desc}",
|
||||
"",
|
||||
]
|
||||
for a in m.out_args:
|
||||
arg_desc = self._expand(a.doc_string, True)
|
||||
res += [
|
||||
f"{a.name}",
|
||||
f" {arg_desc}",
|
||||
"",
|
||||
]
|
||||
res += [""]
|
||||
if m.since:
|
||||
res += [
|
||||
@ -285,6 +296,8 @@ class RstCodeGenerator:
|
||||
for s in iface.signals:
|
||||
title = f"{iface.name}::{s.name}"
|
||||
res += [
|
||||
".. _{title}:",
|
||||
"",
|
||||
title,
|
||||
"^" * len(title),
|
||||
"",
|
||||
|
Loading…
Reference in New Issue
Block a user