Add scaffolding for Python API docs

This commit is contained in:
Simon Hausmann 2025-02-08 18:11:08 +01:00 committed by Simon Hausmann
parent a8909dfbfa
commit 08fc503f68
3 changed files with 15 additions and 2 deletions

View file

@ -1 +1,2 @@
slint/*.so
uv.lock

View file

@ -40,3 +40,9 @@ Tracker = "https://github.com/slint-ui/slint/issues"
[project.optional-dependencies]
dev = ["pytest"]
[dependency-groups]
dev = [
"pdoc>=15.0.1",
"pytest>=8.3.4",
]

View file

@ -1,6 +1,10 @@
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
r'''
.. include:: ../README.md
'''
from importlib.machinery import ModuleSpec
import os
import sys
@ -311,7 +315,6 @@ def callback(global_name=None, name=None):
Image = native.PyImage
Color = native.PyColor
Brush = native.PyBrush
Model = native.PyModelBase
ListModel = models.ListModel
Model = models.Model
Timer = native.Timer
@ -319,4 +322,7 @@ TimerMode = native.TimerMode
Struct = native.PyStruct
def set_xdg_app_id(app_id: str):
native.set_xdg_app_id(app_id)
native.set_xdg_app_id(app_id)
__all__ = ["CompileError", "Component", "load_file", "loader", "Image", "Color",
"Brush", "Model", "ListModel", "Timer", "TimerMode", "set_xdg_app_id"]