Skip to content

Conversation

jorisvandenbossche
Copy link
Member

Encountered this in another PR, but this function always returns a numpy dtype instance (or None), not just any dtype-like descriptor. Rewriting the function slightly to allow specify a stricter return type.

@jorisvandenbossche jorisvandenbossche added the Typing type annotations, mypy/pyright type checking label Sep 7, 2025
@mroeschke mroeschke added this to the 3.0 milestone Sep 8, 2025
@mroeschke mroeschke merged commit a58fb19 into pandas-dev:main Sep 8, 2025
38 checks passed
@mroeschke
Copy link
Member

Thanks @jorisvandenbossche

@jorisvandenbossche jorisvandenbossche deleted the typing-to_numpy_dtype_inference branch September 8, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Typing type annotations, mypy/pyright type checking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants