randolf-scholz opened a new issue, #43285:
URL: https://github.com/apache/arrow/issues/43285

   ### Describe the enhancement requested
   
   When type-checking with `pyright`, the module `pyarrow.compute` raises tons 
of errors of the form
   
   ```
   error: "sum" is not a known attribute of module "pyarrow.compute" 
(reportAttributeAccessIssue)
   ```
   
   One 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:
   
   ```python
   if TYPE_CHECKING:
       def __getattr__(self, name: str, /) -> Any: ...
   ```
   
   See: https://github.com/microsoft/pyright/issues/3909#issuecomment-1236365288
   
   
   
   
   ### Component(s)
   
   Python


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to