jorisvandenbossche commented on PR #55264: URL: https://github.com/apache/arrow/pull/55264#issuecomment-6949588176
> Only a note on [7fa510f](https://github.com/apache/arrow/commit/7fa510f2113d6ba0126c3cc2cf0f2fab518d3a46) - this is to fix strict type checking errors "Missing type arguments" (`np.dtype`, `list`, `tuple`) and errors due to `np.typing.DTypeLike`. @tadeja I think those can partly also be solved by not actually using concrete types like `list` when not needed. Just looked at the specific change for the `categories` argument in `to_pandas` (changing `categories: list | tuple | None` to `categories: list[Any] | tuple[Any, ...] | None`). Based on the code, I _think_ it should be more correct to use `Collection` (we iterate and check containment), instead of list/tuple specifically. (another point here is that, if we add a specific element type, we could probably say the elements should be `str` instead of Any, since field names are strings (strictly speaking we accept other values, but won't work as expected)) -- 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]
