Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jorenham
Copy link
Member

@jorenham jorenham commented Jan 2, 2025

Some type-tests needed to be refined because mypy now supports generic slice types.

The updated bundled typeshed was causing memoryview[int] to not be accepted anymore by npt.ArrayLike on python<3.12. This was also the case with pyright. I solved this by backporting collections.abc.Buffer on python<3.12, and included it in the numpy.typing.ArrayLike type alias, making it equivalent to its python>=3.12 variant (from a static typing perspective).

1.14.1 release notes

@jorenham jorenham changed the title MAINT: bump mypy to 1.14.1 MAINT: bump mypy to 1.14.1 Jan 2, 2025
@charris charris merged commit 12364e3 into numpy:main Jan 2, 2025
69 checks passed
@charris
Copy link
Member

charris commented Jan 2, 2025

Thanks Joren.

charris pushed a commit to charris/numpy that referenced this pull request Jan 7, 2025
* MAINT: bump `mypy` to `1.14.1`

* TYP: fix new `mypy==1.14.1` type-test errors

* TYP: backport `collections.abc.Buffer` for `npt.ArrayLike` on `python<3.11`
@jorenham jorenham deleted the typing/mypy-1.14.1 branch January 8, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants