Skip to content

Add Python type hints#111

Open
MikeWinkelmannXL2 wants to merge 2 commits intoml-explore:mainfrom
MikeWinkelmannXL2:main
Open

Add Python type hints#111
MikeWinkelmannXL2 wants to merge 2 commits intoml-explore:mainfrom
MikeWinkelmannXL2:main

Conversation

@MikeWinkelmannXL2
Copy link

@MikeWinkelmannXL2 MikeWinkelmannXL2 commented Dec 8, 2025

First off, thanks for this library! It has some very interesting concepts. As a Python user, I noticed that the lack of type hints makes the developer experience (IDE autocomplete, static analysis) a bit limited.

This PR addresses that by introducing type stubs for the Python bindings.

Changes:

  • Added .pyi stub files to the Python API to enable IDE support and type checking.
  • Included a utility script used to auto-generate these stubs.

Notes on the Utility Script: The generation script is included to ensure reproducibility. However, it currently has a few limitations:

  • It assumes a .venv exists in the project directory.
  • It is currently a standalone script. Ideally, this logic could be integrated directly into the build process (CMake or setup.py) in the future to ensure stubs are always up to date?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant