tadeja commented on PR #55264: URL: https://github.com/apache/arrow/pull/55264#issuecomment-6963325256
> > Only a note on 7fa510f - this is to fix strict type checking errors "Missing type arguments" (`np.dtype`, `list`, `tuple`) and errors due to `np.typing.DTypeLike`. > > ... > ... 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)) OK, just remembered to post this - verified and fixed to a more suitable `Collection[str]` with 7e9de7d -- 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]
