-
-
Notifications
You must be signed in to change notification settings - Fork 113
Expand file tree
/
Copy pathrylai.toml
More file actions
24 lines (22 loc) · 1.16 KB
/
Copy pathrylai.toml
File metadata and controls
24 lines (22 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# `format` commands run (in order) on the generated .pyi, with the file path
# appended as the final argument. fix_self_handle_stub.py runs first to strip
# leaked pyo3 `Py<Self>` receiver params that rylai re-emits as positional
# parameters (see the script's docstring); ruff then re-formats the result.
format = [
"python3 scripts/fix_self_handle_stub.py",
"uvx ruff format",
"uvx ruff check --select I --fix",
]
# `python_version` intentionally left at rylai's default so the emitted
# stub uses PEP-585 / PEP-604 syntax directly (`tuple[int, ...]`,
# `X | None`). Doing it here removes a post-processing step. The stub
# also opens with `from __future__ import annotations`, so even if a
# tool decides to import the .pyi file on a Python 3.8/3.9 runtime,
# annotations remain lazy strings and don't evaluate at import time.
# Issue #462.
[features]
# Match the released wheel's feature set exactly so the emitted stubs
# describe only symbols that are actually present at runtime (issue #464).
# CI regenerates the stub and runs a symbol-parity check after building
# the release-feature wheel (see python.yml "Verify stub symbol parity" step).
enabled = ["python"]