Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics
14.67k
stars
3.56k
forks
source link
[Python] Add `__getattr__` to `pyarrow.compute` for typing #43285
Open
randolf-scholz opened 4 months ago
Describe the enhancement requested
When type-checking with
pyright
, the modulepyarrow.compute
raises tons of errors of the formOne can use the
useLibraryCodeForTypes=false
option to suppress these, but it's not configurable on a per-module basis.The problem is that these are dynamically generated via https://github.com/apache/arrow/blob/c3aad6ad53a3a8b5106acd49c979f902b1b7aab9/python/pyarrow/compute.py#L336
A workaround until stubs are available would be to add a module-level
__getattr__
function:See: https://github.com/microsoft/pyright/issues/3909#issuecomment-1236365288
Component(s)
Python