GitHub user rok added a comment to the discussion: A new home for pyarrow-stubs?
If I run mypys `stubgen` and then count lines of code on these generated stubs vs proposed ones from `pyarrow-stubs` with `cloc` I get the following: ``` # Generated stubgen --include-docstrings pyarrow cloc --include-ext=pyi ./out/pyarrow ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 97 657 2840 4725 ------------------------------------------------------------------------------- # pyarrow-stubs cloc --include-ext=pyi ./pyarrow ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 62 4650 24496 13011 ------------------------------------------------------------------------------- ``` Meanwhile current numpy: ``` # Generated for numpy stubgen numpy cloc --include-ext=pyi ./out/numpy ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 558 2374 0 22367 ------------------------------------------------------------------------------- # current numpy stubs cloc --include-ext=pyi ./numpy ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Python 259 4032 1055 39146 ------------------------------------------------------------------------------- ``` So it seems numpy has added annotations gradually (or enlarged the API?). Most lines of `pyarrow-stubs` are docstrings which (if I understand correctly) is because docstrings from cython files are not available to IDEs, but with stubs they become available. @zen-xu was that the motivation? We might want to consider automating docstring sync if we keep them. Linters seem to default [against having docstrings in stubs](https://docs.astral.sh/ruff/rules/docstring-in-stub/). GitHub link: https://github.com/apache/arrow/discussions/45919#discussioncomment-14264835 ---- This is an automatically sent email for user@arrow.apache.org. To unsubscribe, please send an email to: user-unsubscr...@arrow.apache.org