mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-01 16:17:25 +00:00
Python: fix doc building (#7921)
This commit is contained in:
parent
b97cce762b
commit
c7d158afe7
1 changed files with 11 additions and 11 deletions
|
@ -5,17 +5,17 @@ import slint
|
|||
import pdoc
|
||||
import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
doc = pdoc.doc.Module(slint)
|
||||
|
||||
model_cls = doc.get("Model")
|
||||
for method in model_cls.inherited_members[("builtins", "PyModelBase")]:
|
||||
method.is_inherited = False
|
||||
if not method.name.startswith("_") and method.name != "init_self":
|
||||
model_cls.own_members.append(method)
|
||||
doc = pdoc.doc.Module(slint)
|
||||
|
||||
out = pdoc.render.html_module(module=doc, all_modules={"foo": doc})
|
||||
model_cls = doc.get("Model")
|
||||
for method in model_cls.inherited_members[("builtins", "PyModelBase")]:
|
||||
method.is_inherited = False
|
||||
if not method.name.startswith("_") and method.name != "init_self":
|
||||
model_cls.own_members.append(method)
|
||||
|
||||
os.makedirs("docs", exist_ok=True)
|
||||
with open("docs/index.html", "w") as f:
|
||||
f.write(out)
|
||||
out = pdoc.render.html_module(module=doc, all_modules={"foo": doc})
|
||||
|
||||
os.makedirs("docs", exist_ok=True)
|
||||
with open("docs/index.html", "w") as f:
|
||||
f.write(out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue