Skip to content

Improve .pyi stub typing coverage in tools/gen_stubs.py (reduce Any fallbacks) #2

Open

Description

@voidstackloop

Summary

tools/gen_stubs.py currently generates python/oxideon/__init__.pyi with 5,557 / 6,290 typed signatures, while 733 signatures still fall back to Any. Improving type mapping in tools/gen_stubs.py will give IDE users (Pyright, mypy, VS Code / Pylance) much better autocomplete and static type checking.

Relevant Files

  • tools/gen_stubs.py
  • python/oxideon/__init__.pyi

How to Get Started

  1. Build the extension locally: maturin develop
  2. Run python tools/gen_stubs.py and inspect which Rust parameter/return types currently map to Any.
  3. Add mappings for common Rust/PyO3 wrapper types (e.g. Option<Vec<...>>, tuple returns, PyRef, Bound<'_, PyAny> overloads).
  4. Re-run python tools/gen_stubs.py and verify the Stub freshness CI check passes.

Activity

  1. added
    documentation
    enhancement
    good first issue
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationenhancementgood first issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions