Commit graph

124 commits

Author SHA1 Message Date
Tobias Hunger
cd6f2e2cf2 ci: Format toml files
... using taplo with default settings

I tried this with 4 spaces indentation, but the patch is almost as
big as this one, so I went with default settings instead as that
is just easier:-)
2025-04-02 11:03:41 +02:00
Simon Hausmann
ed878f01ac Python: Add third-party licenses page to the docs
Fixes #6634
2025-03-29 18:04:30 +01:00
Simon Hausmann
ced9ae7b5f
Python: Fix rendering or callback decorator docs 2025-03-23 13:16:45 +01:00
Simon Hausmann
64d446921d Python: Fix pdoc invocation to render index and search module 2025-03-23 10:29:04 +01:00
Simon Hausmann
c7d158afe7
Python: fix doc building (#7921) 2025-03-23 08:31:37 +01:00
Simon Hausmann
a313916ce6 Python: Begin docs for model
This requires use of the pdoc API to work around an issue with the base methods not showing up in the docs.
2025-03-22 17:14:15 +01:00
Simon Hausmann
d420bd8113 Python: docs for ListModel 2025-03-22 17:14:15 +01:00
Simon Hausmann
44336e0e10 Python: docs for callback and set_xdg_app_id 2025-03-22 17:14:15 +01:00
Simon Hausmann
fc18b69a65 Sync python timer docs
Sync with commit 6aff60b38f
2025-03-22 11:58:34 +01:00
Simon Hausmann
e57e155a2d Python: Add some API docs for timer, timermode, and the loader 2025-03-21 09:37:52 +01:00
Simon Hausmann
98ad1e3aa4 Python: Incrementally add some more API docs 2025-03-20 09:14:17 +01:00
ogoffart
178cf21c2e Bump version number to 1.11.0 2025-03-18 09:48:22 +00:00
Simon Hausmann
bc42b30eac Quick pass at some Python API docs
... and fixed library_paths type signature while at it.
2025-03-18 09:03:47 +01:00
Simon Hausmann
48fbf887aa Python: Hide internal CompileError constructor from docs 2025-02-19 08:52:26 +01:00
Simon Hausmann
45b55b8a8c Python: Remove builtins. namespace use 2025-02-19 08:52:26 +01:00
Simon Hausmann
1fc0c79cbd Python: Run ruff linter 2025-02-19 08:52:26 +01:00
Simon Hausmann
18032e13b4 Python: Remove type ignore comments 2025-02-19 08:52:26 +01:00
Simon Hausmann
5a31ad437e Python: Improve load_file signature's return type 2025-02-16 08:58:47 +00:00
Simon Hausmann
f0f2880430 Python: Add missing Model[T].set_row_data function 2025-02-16 08:58:47 +00:00
Simon Hausmann
3358bc24e3 Format Python files with ruff 2025-02-16 08:58:47 +00:00
Simon Hausmann
9001966dc9 Python: Fix mypy also on the Slint module implementation 2025-02-16 08:58:47 +00:00
Simon Hausmann
607d70b3fa Python: run mypy on the tests 2025-02-16 08:58:47 +00:00
Simon Hausmann
c111098e49 Python: Add more type stubs to the internal Rust API 2025-02-16 08:58:47 +00:00
Simon Hausmann
2d89d6b666 Python: move rust originated types into dedicated .pyi file
That way annotations from __init__.py will get used, instead of
ignored because of the existence of __init__.pyi.
2025-02-12 08:48:45 +01:00
Simon Hausmann
3b367dcc0b Python: Include @slint.callback in the doc reference
(Docs to be written)

- Also fix eq signature and avoid Self to fix links and mypy
2025-02-11 20:57:45 +01:00
Simon Hausmann
5564972e82
Doc wrong Code fence and work around pdoc bug
It seems that with two subsequent fences the second one isn’t rendered.
2025-02-09 20:51:00 +01:00
Simon Hausmann
ddfb18b3cc
doc: fix bullet numbering 2025-02-09 20:32:21 +01:00
Simon Hausmann
94c655731f
Add Python typings for Rust declared types (#7575)
This comes with a bump of the Python version to 3.11
due to the need for typing.Self.
2025-02-09 16:06:34 +01:00
Simon Hausmann
30aefd4957 Python: Some Image docs 2025-02-09 13:50:26 +01:00
Simon Hausmann
c46846b3cb
Switch Python tooling over from pipenv to uv (#7574)
It's faster and easier to use.
2025-02-09 12:09:23 +01:00
Simon Hausmann
74f1674c57 Python: Make the re-exported classes show up property in the documentation
The variable assignment trick doesn't work for pdoc. Instead, fix the name properly and import them as re-export cleanly.
2025-02-09 00:04:30 +01:00
Simon Hausmann
08fc503f68 Add scaffolding for Python API docs 2025-02-09 00:04:30 +01:00
Yuri Astrakhan
9621cae218 Auto-fixed clippy::needless_lifetimes
`__CARGO_FIX_YOLO=1` is a hack, but it does help a lot with the tedious fixes where the result is fairly clear.

See https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

```
__CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::needless_lifetimes

cargo fmt --all
```
2025-02-07 09:20:49 +01:00
Yuri Astrakhan
4ae2627ade A few more format arg inlining
Used these commands and some manual searching

```
cargo clippy --fix  --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --all-targets -- -A clippy::all -W clippy::uninlined_format_args
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2025-02-07 06:43:19 +01:00
ogoffart
c83af3ca5c Bump version number to 1.10.0 2025-01-13 13:38:41 +00:00
Olivier Goffart
3e94bd2167 Janitor: Remove trailing whitespaces from all files
`git grep -I -l -O'sed -i "s/[[:space:]]*$//"' -e ''`
2025-01-10 13:23:22 +01:00
ogoffart
f309a551b5 Bump version number to 1.9.2 2024-12-30 10:18:16 +00:00
aurindam
dc3f29b6da Bump version number to 1.9.1 2024-12-19 12:57:19 +00:00
Simon Hausmann
1888e58735 Add API to set the XDG app id
ChangeLog: Added function to set the XDG app id on Wayland/X11. This needs to be added with respective function names in the language sections.

Fixes #1332
2024-11-22 11:24:06 +01:00
Milian Wolff
69c68b22b2 Also wrap langtype::Type::Struct in an Rc
This makes copying such types much cheaper and will allow us to
intern common struct types in the future too. This further
drops the sample cost for langtype.rs from ~6.6% down to 4.0%.

We are now also able to share/intern common struct types.

Before:
```
  Time (mean ± σ):      1.073 s ±  0.021 s    [User: 0.759 s, System: 0.215 s]
  Range (min … max):    1.034 s …  1.105 s    10 runs

        allocations:            3074261
```

After:
```
  Time (mean ± σ):      1.034 s ±  0.026 s    [User: 0.733 s, System: 0.201 s]
  Range (min … max):    1.000 s …  1.078 s    10 runs

        allocations:            2917476
```
2024-10-28 09:39:54 +01:00
Simon Hausmann
a98d4709be Move printer demo and energy-monitor into new top-level demos/ folder
These are showing off use-cases for Slint, but they're not examples showing individual Slint features.

Also removed the old printerdemo while at it.
2024-10-25 12:09:32 +02:00
ogoffart
eb273a63ee Bump version number to 1.9.0 2024-09-25 11:49:15 +00:00
Enyium
9894eca229 Fixed kebab casing of previous appwindow.slint. 2024-09-20 10:26:49 +02:00
Simon Hausmann
844590cac8
Python: Add support for snake case imports (#6229)
When using slint.loader.app_window.XXX look for "app_window.slint" followed by "app-window.slint".

Fixes #6216
2024-09-20 10:25:14 +02:00
ogoffart
4dd7d96a28 Bump version number to 1.8.0 2024-08-15 12:44:46 +00:00
Simon Hausmann
636de6fc7c Python: Fix support for named exports 2024-08-13 12:04:04 +02:00
Simon Hausmann
1e3f05c983 Python: Expose Slint structs
Structs declared and exported in Slint are now available in the module namespace
with a constructor.

Fixes #5708
2024-08-13 12:04:04 +02:00
Simon Hausmann
833883b028 Python: Fix Slint file loading in callback examples
The foo_slint import has been replaced with the auto-loader.
2024-08-11 10:27:18 +02:00
ogoffart
bbf7edc5a3 Bump version number to 1.7.2 2024-08-09 09:52:17 +00:00
Simon Hausmann
ef92c1a161 Python: reset alpha version tag 2024-07-23 15:16:30 +02:00