Commit 23ed555
authored
Improve auto-generated documentation and type stubs (#1413)
* Improve auto-generated documentation and type stubs
- Use `bytes` and `str | Path` where appropriate.
- Extend the type stub generation to generate the full enum definitions and define `Operation` and `Introspect`.
- Extend the type stub with more operations (all apart from nifti-based ones).
* Re-format `voperation.py` to satisfy flake8
* Fix two small typing issues that mypy found
* Improve the type stubs massively so that all examples now pass mypy and pyright
- Create a separate stub for `enums.py` to support importing these separately.
- Properly type the NumPy functions, which mypy and pyright ignore is NumPy is not available.
- Add the missing trigonometric, exponential, and complex operations.
- Force keyword arguments to be keyword arguments.
- Type `interpolate` as `Interpolate`, not the overly broad `GObject`.
- Introduce type aliases to reduce duplication.
- Make very minor adjustments elsewhere to avoid mypy errors.
* Add the missing libraries to `ci.yml`
* Switch to PyPy 3.11 for CI
* Switch to PyPy 3.10, which works on Ubuntu 22.041 parent e855f6c commit 23ed555
9 files changed
Lines changed: 1433 additions & 874 deletions
File tree
- .github/workflows
- doc
- examples
- pyvips
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
Large diffs are not rendered by default.
0 commit comments