adriangb commented on issue #32609: URL: https://github.com/apache/arrow/issues/32609#issuecomment-2101466692
> How much work is it to do? Once we have one example PR of how to add type stubs, that becomes the template for others to make contributions to them I'm happy to try to make an initial PR. My approach would be to add a `py.typed` file and add a `.pyi` file for some module (happy to do whichever is chosen). > Do we have a reliable way to validate them in CI? We would want to make sure the stubs are both accurate and cover the whole module. IMO the best way is to force typing into tests. That's also good dogfooding. But it can result in a lot of code churn (need to rewrite a lot of the tests I imagine). Type checkers do allow whitelisting files so it would probably make sense to pick a very small test file to whitelist and either fix all stubs it needs or add `# type: ignore`s. That said, I do think _something is better than nothing_ and these stubs won't impact runtime behavior so even if they are not totally accurate or are missing module members it's still better than no typing at all. -- 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]
