diff --git a/pixi.lock b/pixi.lock index 94cd02af..e2e986ec 100644 --- a/pixi.lock +++ b/pixi.lock @@ -234,7 +234,7 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/mpc-1.3.1-h24ddda3_1.conda - conda: https://prefix.dev/conda-forge/linux-64/mpfr-4.2.1-h90cbb55_3.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.3.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/linux-64/mypy-1.19.1-py314h5bd0f2a_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/mypy-1.20.1-py314h5bd0f2a_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/myst-parser-5.0.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda @@ -422,7 +422,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-64/mpc-1.3.1-h9d8efa1_1.conda - conda: https://prefix.dev/conda-forge/osx-64/mpfr-4.2.1-haed47dc_3.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.3.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/osx-64/mypy-1.19.1-py314h6482030_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/mypy-1.20.1-py314h217eccc_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/myst-parser-5.0.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/osx-64/ncurses-6.5-h0622a9a_3.conda @@ -605,7 +605,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/mpc-1.3.1-h8f1351a_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/mpfr-4.2.1-hb693164_3.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.3.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.19.1-py314hbdd0d06_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.20.1-py314hbdd0d06_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/myst-parser-5.0.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/ncurses-6.5-h5e97a16_3.conda @@ -770,7 +770,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/meson-python-0.19.0-pyh7e86bf3_2.conda - conda: https://prefix.dev/conda-forge/win-64/mkl-2025.3.0-hac47afa_455.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.4.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/win-64/mypy-1.19.1-py314h5a2d7ad_0.conda + - conda: https://prefix.dev/conda-forge/win-64/mypy-1.20.1-py314h5a2d7ad_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/myst-parser-5.0.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/networkx-3.6.1-pyhcf101f3_0.conda @@ -1006,7 +1006,7 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/mpc-1.3.1-h24ddda3_1.conda - conda: https://prefix.dev/conda-forge/linux-64/mpfr-4.2.1-h90cbb55_3.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.3.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/linux-64/mypy-1.19.1-py314h5bd0f2a_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/mypy-1.20.1-py314h5bd0f2a_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/myst-parser-5.0.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/linux-64/nccl-2.29.3.1-h4d09622_0.conda @@ -1197,7 +1197,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-64/mpc-1.3.1-h9d8efa1_1.conda - conda: https://prefix.dev/conda-forge/osx-64/mpfr-4.2.1-haed47dc_3.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.3.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/osx-64/mypy-1.19.1-py314h6482030_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/mypy-1.20.1-py314h217eccc_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/myst-parser-5.0.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/osx-64/ncurses-6.5-h0622a9a_3.conda @@ -1380,7 +1380,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/mpc-1.3.1-h8f1351a_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/mpfr-4.2.1-hb693164_3.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.3.0-pyhd8ed1ab_1.conda - - conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.19.1-py314hbdd0d06_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.20.1-py314hbdd0d06_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/myst-parser-5.0.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/ncurses-6.5-h5e97a16_3.conda @@ -1565,7 +1565,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/meson-python-0.19.0-pyh7e86bf3_2.conda - conda: https://prefix.dev/conda-forge/win-64/mkl-2025.3.0-hac47afa_455.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.4.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/win-64/mypy-1.19.1-py314h5a2d7ad_0.conda + - conda: https://prefix.dev/conda-forge/win-64/mypy-1.20.1-py314h5a2d7ad_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/myst-parser-5.0.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/networkx-3.6.1-pyhcf101f3_0.conda @@ -2115,7 +2115,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/mccabe-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/meson-1.10.1-pyhcf101f3_0.conda - conda: https://prefix.dev/conda-forge/noarch/meson-python-0.19.0-pyh7e86bf3_2.conda - - conda: https://prefix.dev/conda-forge/linux-64/mypy-1.19.1-py314h5bd0f2a_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/mypy-1.20.1-py314h5bd0f2a_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda - conda: https://prefix.dev/conda-forge/linux-64/ninja-1.13.2-h171cf75_0.conda @@ -2238,7 +2238,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/mccabe-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/meson-1.10.1-pyhcf101f3_0.conda - conda: https://prefix.dev/conda-forge/noarch/meson-python-0.19.0-pyh7e86bf3_2.conda - - conda: https://prefix.dev/conda-forge/osx-64/mypy-1.19.1-py314h6482030_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/mypy-1.20.1-py314h217eccc_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/osx-64/ncurses-6.5-h0622a9a_3.conda - conda: https://prefix.dev/conda-forge/osx-64/ninja-1.13.2-hfc0b2d5_0.conda @@ -2361,7 +2361,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/mccabe-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/meson-1.10.1-pyhcf101f3_0.conda - conda: https://prefix.dev/conda-forge/noarch/meson-python-0.19.0-pyh7e86bf3_2.conda - - conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.19.1-py314hbdd0d06_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.20.1-py314hbdd0d06_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/ncurses-6.5-h5e97a16_3.conda - conda: https://prefix.dev/conda-forge/osx-arm64/ninja-1.13.2-h49c215f_0.conda @@ -2476,7 +2476,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/meson-1.10.1-pyhcf101f3_0.conda - conda: https://prefix.dev/conda-forge/noarch/meson-python-0.19.0-pyh7e86bf3_2.conda - conda: https://prefix.dev/conda-forge/win-64/mkl-2025.3.0-hac47afa_455.conda - - conda: https://prefix.dev/conda-forge/win-64/mypy-1.19.1-py314h5a2d7ad_0.conda + - conda: https://prefix.dev/conda-forge/win-64/mypy-1.20.1-py314h5a2d7ad_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/win-64/ninja-1.13.2-h477610d_0.conda - conda: https://prefix.dev/conda-forge/win-64/nodejs-25.6.1-he453025_0.conda @@ -10355,71 +10355,71 @@ packages: - pkg:pypi/mpmath?source=compressed-mapping size: 464419 timestamp: 1771870721583 -- conda: https://prefix.dev/conda-forge/linux-64/mypy-1.19.1-py314h5bd0f2a_0.conda - sha256: 4e607095b92cac2ec6dbb8de348d8e006408291c9c2805926f01e4a30e94edbb - md5: 0490f2b08d179719201fdb9514d67157 +- conda: https://prefix.dev/conda-forge/linux-64/mypy-1.20.1-py314h5bd0f2a_0.conda + sha256: 98ce082952223b2a0d41b2343e1f236b8a82f89a227f3fe529756c7ffdc65369 + md5: ecf49313f1d3ffb37b71f7ba0f7e9809 depends: - __glibc >=2.17,<3.0.a0 - libgcc >=14 - mypy_extensions >=1.0.0 - - pathspec >=0.9.0 + - pathspec >=1.0.0 - psutil >=4.0 - python >=3.14,<3.15.0a0 - - python-librt >=0.6.2 + - python-librt >=0.8.0 - python_abi 3.14.* *_cp314 - typing_extensions >=4.6.0 license: MIT license_family: MIT purls: - - pkg:pypi/mypy?source=hash-mapping - size: 18632958 - timestamp: 1765795548407 -- conda: https://prefix.dev/conda-forge/osx-64/mypy-1.19.1-py314h6482030_0.conda - sha256: b36d3a5728413d18dedfecdfd0248647b21f3e725547c03ef245bc1c08da98f8 - md5: 62c7130c7f42ab43c9d1d64bbc7c2f3e + - pkg:pypi/mypy?source=compressed-mapping + size: 20295524 + timestamp: 1776069509844 +- conda: https://prefix.dev/conda-forge/osx-64/mypy-1.20.1-py314h217eccc_0.conda + sha256: dadb1aeed1733b6860a84078c48f0cf98d2aac20cf800e2639245150620c8b20 + md5: 6d1e019eb391b1af2dc8b2af5ffe60c8 depends: - - __osx >=10.13 + - __osx >=11.0 - mypy_extensions >=1.0.0 - - pathspec >=0.9.0 + - pathspec >=1.0.0 - psutil >=4.0 - python >=3.14,<3.15.0a0 - - python-librt >=0.6.2 + - python-librt >=0.8.0 - python_abi 3.14.* *_cp314 - typing_extensions >=4.6.0 license: MIT license_family: MIT purls: - pkg:pypi/mypy?source=hash-mapping - size: 12043718 - timestamp: 1765796036801 -- conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.19.1-py314hbdd0d06_0.conda - sha256: c5c9a691dc00ce9a726426f971fbe21d0501ec8c6228513b945210898f26c761 - md5: 584f58048dc4af70f6c647b40a7049a6 + size: 12984065 + timestamp: 1776069986289 +- conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.20.1-py314hbdd0d06_0.conda + sha256: 620325290662f847461e5ccbdbf7583acbb5fb3d85b09a7a467c52d9d75e9244 + md5: 119c54cbfd6815017af13e9ce7257639 depends: - __osx >=11.0 - mypy_extensions >=1.0.0 - - pathspec >=0.9.0 + - pathspec >=1.0.0 - psutil >=4.0 - python >=3.14,<3.15.0a0 - python >=3.14,<3.15.0a0 *_cp314 - - python-librt >=0.6.2 + - python-librt >=0.8.0 - python_abi 3.14.* *_cp314 - typing_extensions >=4.6.0 license: MIT license_family: MIT purls: - pkg:pypi/mypy?source=hash-mapping - size: 11320681 - timestamp: 1765795843941 -- conda: https://prefix.dev/conda-forge/win-64/mypy-1.19.1-py314h5a2d7ad_0.conda - sha256: 59c5f9046ad3ab9a449dee682392799d9589c12e470f0c6fed7f2aaa9b8e8ca2 - md5: 4ca21331a3962c4fcf658d6d47df4c0b + size: 12126390 + timestamp: 1776070870528 +- conda: https://prefix.dev/conda-forge/win-64/mypy-1.20.1-py314h5a2d7ad_0.conda + sha256: 55effd4c7d1d9a2246ce98d2880f2b3478021bf088d389551c911ce77e550bcc + md5: 4391f1f6a56943171957c79ffc93da21 depends: - mypy_extensions >=1.0.0 - - pathspec >=0.9.0 + - pathspec >=1.0.0 - psutil >=4.0 - python >=3.14,<3.15.0a0 - - python-librt >=0.6.2 + - python-librt >=0.8.0 - python_abi 3.14.* *_cp314 - typing_extensions >=4.6.0 - ucrt >=10.0.20348.0 @@ -10429,8 +10429,8 @@ packages: license_family: MIT purls: - pkg:pypi/mypy?source=hash-mapping - size: 9114684 - timestamp: 1765795714379 + size: 9772523 + timestamp: 1776069743600 - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda sha256: 6ed158e4e5dd8f6a10ad9e525631e35cee8557718f83de7a4e3966b1f772c4b1 md5: e9c622e0d00fa24a6292279af3ab6d06 diff --git a/pyproject.toml b/pyproject.toml index 9ced81be..c1429fdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,7 +92,7 @@ array-api-extra.path = "." [tool.pixi.feature.lint.dependencies] typing-extensions = ">=4.15.0" pylint = ">=4.0.5" -mypy = ">=1.19.1" +mypy = ">=1.20.0" basedpyright = ">=1.39.0" numpydoc = ">=1.10.0,<2" # import dependencies for mypy: diff --git a/src/array_api_extra/_lib/_utils/_helpers.py b/src/array_api_extra/_lib/_utils/_helpers.py index 097307a2..3606d344 100644 --- a/src/array_api_extra/_lib/_utils/_helpers.py +++ b/src/array_api_extra/_lib/_utils/_helpers.py @@ -407,7 +407,7 @@ def persistent_id( self, obj: object ) -> Literal[0, 1, None]: # numpydoc ignore=GL08 if isinstance(obj, cls): - instances.append(obj) # type: ignore[arg-type] + instances.append(obj) return 0 typ_ = type(obj)