dangotbanned commented on PR #51680: URL: https://github.com/apache/arrow/pull/51680#issuecomment-6017038048
Thanks for the ping @rok > Which are must-haves and which are nice-to-haves? This is a great question. I can see there are already some opinions above, but would like to suggest a different starting point. ## Questions If you use these generated stubs and run a type checker [^1] with a strict config on the `pyarrow` test suite: 1. How many (typing checking) errors do they report from correct use? 2. How many (runtime) errors do the stubs help catch? These are the easiest things to measure, given that you have the cases already written. However, you might find that the tests don't reflect the way user's actually write code using `pyarrow`. Getting the answer to that would look something like (https://github.com/numpy/numpy/tree/db6d7c2df8ecf7e1507209055037327512892b86/numpy/typing/tests/data) ## Opinion I think if generated stubs create an equal or better user-experience than manually written ones - then they are a great choice. However, I expect that "simple" or otherwise generated types won't capture the real complexity of your API and mean lots of `# type: ignore`s on correct code [^1]: Preferably multiple, because they will behave differently from what I'm seeing in this PR -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
