liamholmes31 opened a new issue, #48677:
URL: https://github.com/apache/arrow/issues/48677

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   I’m seeing a pyright type-checking error when I try to treat a 
pyarrow.compute function (for example pc.sin) as a callable that takes a 
ChunkedArray and returns a ChunkedArray.
   
   At runtime this works as expected, but pyright reports a type error.
   
   **Minimal example:**
   
   ```
   import pyarrow.compute as pc
   from typing import Callable, Any
   from pyarrow import ChunkedArray
   
   f: Callable[[ChunkedArray[Any]], ChunkedArray[Any]] = pc.sin
   ```
   
   Leads to pyright error:
   ```
   Type of "pc.sin" is "Overload[...]" which cannot be assigned to
   "Callable[[ChunkedArray[Any]], ChunkedArray[Any]]"
   (reportArgumentType)
   ```
   
   **Environment**
   pyarrow: 22.0.0
   pyarrow-stubs: 19.2
   pyright: 1.1.407
   Python: 3.12.12
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to