Summary
The Python SDK currently runs Ruff, but the selected rule set only includes E, F, I, B, and C4. Ruff's annotation rules (ANN...) are not enabled, so CI does not enforce missing function argument or return annotations.
Motivation
Adding Ruff ANN gives a fast, low-cost guardrail that keeps new Python code annotated. This is complementary to a full type checker: Ruff can require annotations to exist, while mypy or pyright validates whether the annotations are correct.
Proposed work
- Enable an appropriate subset of Ruff
ANN rules for the Python SDK.
- Decide whether tests, examples, generated code, or small local callbacks need scoped ignores.
- Keep existing generated code excluded from annotation enforcement.
- Update CI only through the existing
ruff check path; avoid adding a separate annotation-only job unless needed.
Acceptance criteria
uv run --extra dev ruff check . in sdk/python reports missing annotations for newly covered SDK code.
- Existing intentional exceptions are documented through narrow per-file ignores or inline
noqa comments.
- The change does not require broad unrelated annotation churn outside the intended Python SDK scope.
Summary
The Python SDK currently runs Ruff, but the selected rule set only includes
E,F,I,B, andC4. Ruff's annotation rules (ANN...) are not enabled, so CI does not enforce missing function argument or return annotations.Motivation
Adding Ruff
ANNgives a fast, low-cost guardrail that keeps new Python code annotated. This is complementary to a full type checker: Ruff can require annotations to exist, while mypy or pyright validates whether the annotations are correct.Proposed work
ANNrules for the Python SDK.ruff checkpath; avoid adding a separate annotation-only job unless needed.Acceptance criteria
uv run --extra dev ruff check .insdk/pythonreports missing annotations for newly covered SDK code.noqacomments.