From 9375f638607042f35a008e6002d9d95d088afd4c Mon Sep 17 00:00:00 2001 From: crusaderky Date: Tue, 10 Jun 2025 10:05:26 +0100 Subject: [PATCH] TYP: replace basedmypy with mypy --- pixi.lock | 362 +++++++++++++++++--- pyproject.toml | 11 +- src/array_api_extra/_lib/_at.py | 2 +- src/array_api_extra/_lib/_backends.py | 2 +- src/array_api_extra/_lib/_funcs.py | 12 +- src/array_api_extra/_lib/_lazy.py | 12 +- src/array_api_extra/_lib/_testing.py | 2 +- src/array_api_extra/_lib/_utils/_compat.pyi | 2 +- src/array_api_extra/_lib/_utils/_helpers.py | 8 +- src/array_api_extra/_lib/_utils/_typing.pyi | 4 +- src/array_api_extra/testing.py | 16 +- tests/test_at.py | 10 +- tests/test_funcs.py | 5 +- tests/test_helpers.py | 13 +- tests/test_lazy.py | 2 +- tests/test_testing.py | 3 +- 16 files changed, 359 insertions(+), 107 deletions(-) diff --git a/pixi.lock b/pixi.lock index c5eadf27..03cc1128 100644 --- a/pixi.lock +++ b/pixi.lock @@ -101,9 +101,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/asttokens-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/linux-64/brotli-python-1.1.0-py310hf71b8c6_2.conda - conda: https://prefix.dev/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda @@ -187,6 +185,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.16.0-py310ha75aee5_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-4.0.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda @@ -203,12 +202,14 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pexpect-4.9.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pickleshare-0.7.5-pyhd8ed1ab_1004.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/prompt-toolkit-3.0.51-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/psutil-7.0.0-py310ha75aee5_0.conda - conda: https://prefix.dev/conda-forge/noarch/ptyprocess-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pure_eval-0.2.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-2.13.6-pyhc790b64_3.conda @@ -274,9 +275,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/asttokens-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/osx-64/brotli-python-1.1.0-py310h53e7c6a_2.conda - conda: https://prefix.dev/conda-forge/osx-64/bzip2-1.0.8-hfdf4475_7.conda @@ -353,6 +352,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.16.0-py310hbb8c376_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-4.0.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/osx-64/ncurses-6.5-h0622a9a_3.conda @@ -369,12 +369,14 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pexpect-4.9.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pickleshare-0.7.5-pyhd8ed1ab_1004.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/prompt-toolkit-3.0.51-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/psutil-7.0.0-py310hbb8c376_0.conda - conda: https://prefix.dev/conda-forge/noarch/ptyprocess-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pure_eval-0.2.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-2.13.6-pyhc790b64_3.conda @@ -440,9 +442,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/asttokens-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/brotli-python-1.1.0-py310hb4ad77e_2.conda - conda: https://prefix.dev/conda-forge/osx-arm64/bzip2-1.0.8-h99b78c6_7.conda @@ -516,6 +516,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.16.0-py310h078409c_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-4.0.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/ncurses-6.5-h5e97a16_3.conda @@ -533,12 +534,14 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pexpect-4.9.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pickleshare-0.7.5-pyhd8ed1ab_1004.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/prompt-toolkit-3.0.51-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/psutil-7.0.0-py310h078409c_0.conda - conda: https://prefix.dev/conda-forge/noarch/ptyprocess-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pure_eval-0.2.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-2.13.6-pyhc790b64_3.conda @@ -603,9 +606,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/asttokens-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/win-64/brotli-python-1.1.0-py310h9e98ed7_2.conda - conda: https://prefix.dev/conda-forge/win-64/bzip2-1.0.8-h2466b09_7.conda @@ -668,6 +669,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/mdurl-0.1.2-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/mkl-2024.2.2-h66d3029_15.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.3.0-pyhd8ed1ab_1.conda + - conda: https://prefix.dev/conda-forge/win-64/mypy-1.16.0-py310ha8f682b_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-4.0.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/networkx-3.4.2-pyh267e887_2.conda @@ -682,11 +684,13 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pickleshare-0.7.5-pyhd8ed1ab_1004.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/prompt-toolkit-3.0.51-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/win-64/psutil-7.0.0-py310ha8f682b_0.conda - conda: https://prefix.dev/conda-forge/noarch/pure_eval-0.2.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-2.13.6-pyhc790b64_3.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-global-2.13.6-pyh6a1d191_3.conda @@ -760,9 +764,7 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/attr-2.5.1-h166bdaf_1.tar.bz2 - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/linux-64/brotli-python-1.1.0-py310hf71b8c6_2.conda - conda: https://prefix.dev/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda @@ -889,6 +891,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.16.0-py310ha75aee5_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-4.0.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/linux-64/nccl-2.27.3.1-h9b8ff78_0.conda @@ -906,12 +909,14 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pexpect-4.9.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pickleshare-0.7.5-pyhd8ed1ab_1004.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/prompt-toolkit-3.0.51-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/psutil-7.0.0-py310ha75aee5_0.conda - conda: https://prefix.dev/conda-forge/noarch/ptyprocess-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pure_eval-0.2.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-2.13.6-pyhc790b64_3.conda @@ -980,9 +985,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/asttokens-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/osx-64/brotli-python-1.1.0-py310h53e7c6a_2.conda - conda: https://prefix.dev/conda-forge/osx-64/bzip2-1.0.8-hfdf4475_7.conda @@ -1059,6 +1062,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.16.0-py310hbb8c376_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-4.0.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/osx-64/ncurses-6.5-h0622a9a_3.conda @@ -1075,12 +1079,14 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pexpect-4.9.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pickleshare-0.7.5-pyhd8ed1ab_1004.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/prompt-toolkit-3.0.51-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/psutil-7.0.0-py310hbb8c376_0.conda - conda: https://prefix.dev/conda-forge/noarch/ptyprocess-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pure_eval-0.2.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-2.13.6-pyhc790b64_3.conda @@ -1146,9 +1152,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/asttokens-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/brotli-python-1.1.0-py310hb4ad77e_2.conda - conda: https://prefix.dev/conda-forge/osx-arm64/bzip2-1.0.8-h99b78c6_7.conda @@ -1222,6 +1226,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.16.0-py310h078409c_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-4.0.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/osx-arm64/ncurses-6.5-h5e97a16_3.conda @@ -1239,12 +1244,14 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pexpect-4.9.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pickleshare-0.7.5-pyhd8ed1ab_1004.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/prompt-toolkit-3.0.51-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/psutil-7.0.0-py310h078409c_0.conda - conda: https://prefix.dev/conda-forge/noarch/ptyprocess-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pure_eval-0.2.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-2.13.6-pyhc790b64_3.conda @@ -1310,9 +1317,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/asttokens-3.0.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/win-64/brotli-python-1.1.0-py310h9e98ed7_2.conda - conda: https://prefix.dev/conda-forge/win-64/bzip2-1.0.8-h2466b09_7.conda @@ -1398,6 +1403,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/mdurl-0.1.2-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/mkl-2024.2.2-h66d3029_15.conda - conda: https://prefix.dev/conda-forge/noarch/mpmath-1.3.0-pyhd8ed1ab_1.conda + - conda: https://prefix.dev/conda-forge/win-64/mypy-1.16.0-py310ha8f682b_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-4.0.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/networkx-3.4.2-pyh267e887_2.conda @@ -1412,11 +1418,13 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/parso-0.8.4-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pickleshare-0.7.5-pyhd8ed1ab_1004.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/prompt-toolkit-3.0.51-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/win-64/psutil-7.0.0-py310ha8f682b_0.conda - conda: https://prefix.dev/conda-forge/noarch/pure_eval-0.2.3-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-2.13.6-pyhc790b64_3.conda - conda: https://prefix.dev/conda-forge/noarch/pybind11-global-2.13.6-pyh6a1d191_3.conda @@ -1854,9 +1862,7 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/astroid-3.3.10-py313h78bf25f_0.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/linux-64/brotli-python-1.1.0-py313h46c70d0_2.conda - conda: https://prefix.dev/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda - conda: https://prefix.dev/conda-forge/noarch/ca-certificates-2025.4.26-hbd8a1cb_0.conda @@ -1909,6 +1915,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/locket-1.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/linux-64/markupsafe-3.0.2-py313h8060acc_1.conda - conda: https://prefix.dev/conda-forge/noarch/mccabe-0.7.0-pyhd8ed1ab_1.conda + - conda: https://prefix.dev/conda-forge/linux-64/mypy-1.16.0-py313h536fd9c_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/noarch/nodeenv-1.9.1-pyhd8ed1ab_1.conda @@ -1919,9 +1926,11 @@ environments: - conda: https://prefix.dev/conda-forge/linux-64/openssl-3.5.0-h7b32b05_1.conda - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/linux-64/psutil-7.0.0-py313h536fd9c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pycparser-2.22-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/pygments-2.19.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pylint-3.3.7-pyhe01879c_0.conda @@ -1967,9 +1976,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-64/astroid-3.3.10-py313habf4b1d_0.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/osx-64/brotli-python-1.1.0-py313h9ea2907_2.conda - conda: https://prefix.dev/conda-forge/osx-64/bzip2-1.0.8-hfdf4475_7.conda - conda: https://prefix.dev/conda-forge/noarch/ca-certificates-2025.4.26-hbd8a1cb_0.conda @@ -2017,6 +2024,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/locket-1.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/osx-64/markupsafe-3.0.2-py313h717bdf5_1.conda - conda: https://prefix.dev/conda-forge/noarch/mccabe-0.7.0-pyhd8ed1ab_1.conda + - conda: https://prefix.dev/conda-forge/osx-64/mypy-1.16.0-py313h63b0ddb_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/noarch/nodeenv-1.9.1-pyhd8ed1ab_1.conda @@ -2027,9 +2035,11 @@ environments: - conda: https://prefix.dev/conda-forge/osx-64/openssl-3.5.0-hc426f3f_1.conda - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/osx-64/psutil-7.0.0-py313h63b0ddb_0.conda - conda: https://prefix.dev/conda-forge/noarch/pycparser-2.22-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/pygments-2.19.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pylint-3.3.7-pyhe01879c_0.conda @@ -2075,9 +2085,7 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/astroid-3.3.10-py313h8f79df9_0.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/osx-arm64/brotli-python-1.1.0-py313h3579c5c_2.conda - conda: https://prefix.dev/conda-forge/osx-arm64/bzip2-1.0.8-h99b78c6_7.conda - conda: https://prefix.dev/conda-forge/noarch/ca-certificates-2025.4.26-hbd8a1cb_0.conda @@ -2125,6 +2133,7 @@ environments: - conda: https://prefix.dev/conda-forge/noarch/locket-1.0.0-pyhd8ed1ab_0.tar.bz2 - conda: https://prefix.dev/conda-forge/osx-arm64/markupsafe-3.0.2-py313ha9b7d5b_1.conda - conda: https://prefix.dev/conda-forge/noarch/mccabe-0.7.0-pyhd8ed1ab_1.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.16.0-py313h90d716c_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/noarch/nodeenv-1.9.1-pyhd8ed1ab_1.conda @@ -2135,9 +2144,11 @@ environments: - conda: https://prefix.dev/conda-forge/osx-arm64/openssl-3.5.0-h81ee809_1.conda - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/osx-arm64/psutil-7.0.0-py313h90d716c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pycparser-2.22-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/pygments-2.19.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pylint-3.3.7-pyhe01879c_0.conda @@ -2183,9 +2194,7 @@ environments: - conda: https://prefix.dev/conda-forge/win-64/astroid-3.3.10-py313hfa70ccb_0.conda - conda: https://prefix.dev/conda-forge/noarch/attrs-25.3.0-pyh71513ae_0.conda - conda: https://prefix.dev/conda-forge/noarch/babel-2.17.0-pyhd8ed1ab_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda - - conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/brotli-python-1.1.0-py313h5813708_2.conda - conda: https://prefix.dev/conda-forge/win-64/bzip2-1.0.8-h2466b09_7.conda - conda: https://prefix.dev/conda-forge/noarch/ca-certificates-2025.4.26-h4c7d964_0.conda @@ -2232,6 +2241,7 @@ environments: - conda: https://prefix.dev/conda-forge/win-64/markupsafe-3.0.2-py313hb4c8b1a_1.conda - conda: https://prefix.dev/conda-forge/noarch/mccabe-0.7.0-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/mkl-2024.2.2-h66d3029_15.conda + - conda: https://prefix.dev/conda-forge/win-64/mypy-1.16.0-py313ha7868ed_0.conda - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda - conda: https://prefix.dev/conda-forge/noarch/nodeenv-1.9.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/win-64/nodejs-22.13.0-hfeaa22a_0.conda @@ -2241,9 +2251,11 @@ environments: - conda: https://prefix.dev/conda-forge/win-64/openssl-3.5.0-ha4e3fda_1.conda - conda: https://prefix.dev/conda-forge/noarch/packaging-25.0-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/partd-1.4.2-pyhd8ed1ab_0.conda + - conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda - conda: https://prefix.dev/conda-forge/noarch/platformdirs-4.3.8-pyhe01879c_0.conda - conda: https://prefix.dev/conda-forge/noarch/pluggy-1.6.0-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pre-commit-4.2.0-pyha770c72_0.conda + - conda: https://prefix.dev/conda-forge/win-64/psutil-7.0.0-py313ha7868ed_0.conda - conda: https://prefix.dev/conda-forge/noarch/pycparser-2.22-pyh29332c3_1.conda - conda: https://prefix.dev/conda-forge/noarch/pygments-2.19.1-pyhd8ed1ab_0.conda - conda: https://prefix.dev/conda-forge/noarch/pylint-3.3.7-pyhe01879c_0.conda @@ -3936,7 +3948,7 @@ packages: - pypi: ./ name: array-api-extra version: 0.8.1.dev0 - sha256: 9d76fb8805ceb542471e2d82f1aa6b821db5f0a64fe04cc02d3d7c4bb728437e + sha256: 026f2389147e594fb81cfd47423eb90f6d7253d12ea1e0e0ea739e6aa4dd2e63 requires_dist: - array-api-compat>=1.12.0,<2 requires_python: '>=3.10' @@ -4101,21 +4113,6 @@ packages: - pkg:pypi/babel?source=compressed-mapping size: 6938256 timestamp: 1738490268466 -- conda: https://prefix.dev/conda-forge/noarch/basedmypy-2.10.0-pyh29332c3_1.conda - sha256: cb8337519cb8190c84a3498c05490f18ed5e5367c1615dd7a30146b81abd7c1d - md5: 495817f1ac090aa7c47e45cfd1d1a801 - depends: - - python >=3.9 - - basedtyping >=0.0.3 - - typing-extensions >=4.1.0 - - mypy_extensions >=1.0.0 - - tomli >=1.1.0 - - python - license: BSD-3-Clause AND Apache-2.0 - purls: - - pkg:pypi/basedmypy?source=hash-mapping - size: 1590486 - timestamp: 1741865637604 - conda: https://prefix.dev/conda-forge/noarch/basedpyright-1.29.2-pyhe01879c_0.conda sha256: a5e63030159e8c9c65314d0d09d3cc65dcaf0ca2bebb4e396d2deac3351d1ee5 md5: 39ca9f1815ff1ad3aaf89b21f00487a4 @@ -4128,20 +4125,6 @@ packages: - pkg:pypi/basedpyright?source=hash-mapping size: 8231612 timestamp: 1747891728335 -- conda: https://prefix.dev/conda-forge/noarch/basedtyping-0.1.10-pyhd8ed1ab_1.conda - sha256: 73badfd807775e6e171de10ab752fd4706fe9360f6fd0cfabd509c670d12951b - md5: 234a48e49c3913330665c444824e6533 - depends: - - mypy_extensions >=1.0.0 - - python >=3.9,<4.0.0 - - tomli >=1.1.0 - - typing-extensions >=4.1.0 - license: MIT - license_family: MIT - purls: - - pkg:pypi/basedtyping?source=hash-mapping - size: 22725 - timestamp: 1735032220353 - conda: https://prefix.dev/conda-forge/noarch/beautifulsoup4-4.13.4-pyha770c72_0.conda sha256: ddb0df12fd30b2d36272f5daf6b6251c7625d6a99414d7ea930005bbaecad06d md5: 9f07c4fc992adb2d6c30da7fab3959a7 @@ -8033,6 +8016,154 @@ packages: - pkg:pypi/mpmath?source=hash-mapping size: 439705 timestamp: 1733302781386 +- conda: https://prefix.dev/conda-forge/linux-64/mypy-1.16.0-py310ha75aee5_0.conda + sha256: 5cbdfd2064073710b6d4c8a03b187e361c0227e3351744cf541ff9633d9da379 + md5: a61944eed39e4d3aebe2878d8e0439d9 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - mypy_extensions >=1.0.0 + - pathspec >=0.9.0 + - psutil >=4.0 + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + - tomli >=1.1.0 + - typing_extensions >=4.6.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mypy?source=hash-mapping + size: 18162508 + timestamp: 1748547897549 +- conda: https://prefix.dev/conda-forge/linux-64/mypy-1.16.0-py313h536fd9c_0.conda + sha256: 542234e8707c1784acd744d6234d36ce3b5943acf998a2d453feff319266676e + md5: 3ffbe69221d685e9afa221ef0e2a71c6 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - mypy_extensions >=1.0.0 + - pathspec >=0.9.0 + - psutil >=4.0 + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + - typing_extensions >=4.6.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mypy?source=hash-mapping + size: 17269093 + timestamp: 1748547494947 +- conda: https://prefix.dev/conda-forge/osx-64/mypy-1.16.0-py310hbb8c376_0.conda + sha256: d272291c6e59725d88826cb140768e0bd6047f17ffe094ca054f51e9153f1a2c + md5: f23ad57327906f61b85a0ce6b1a26194 + depends: + - __osx >=10.13 + - mypy_extensions >=1.0.0 + - pathspec >=0.9.0 + - psutil >=4.0 + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + - tomli >=1.1.0 + - typing_extensions >=4.6.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mypy?source=hash-mapping + size: 11951514 + timestamp: 1748547572039 +- conda: https://prefix.dev/conda-forge/osx-64/mypy-1.16.0-py313h63b0ddb_0.conda + sha256: 83ba7f072c565ebdb7f0753078951d7e06c52f9f60511ca8481255406caadc5d + md5: ec5f77fa3f5136668cbcb6bcbfb1ef83 + depends: + - __osx >=10.13 + - mypy_extensions >=1.0.0 + - pathspec >=0.9.0 + - psutil >=4.0 + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + - typing_extensions >=4.6.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mypy?source=hash-mapping + size: 11232466 + timestamp: 1748547240219 +- conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.16.0-py310h078409c_0.conda + sha256: e8c4d987cc13ced8bca9128ac325fe09f14ffbcedf14e295d25b1328b9d829dc + md5: 1ad2eb08347327aa09a0331526089939 + depends: + - __osx >=11.0 + - mypy_extensions >=1.0.0 + - pathspec >=0.9.0 + - psutil >=4.0 + - python >=3.10,<3.11.0a0 + - python >=3.10,<3.11.0a0 *_cpython + - python_abi 3.10.* *_cp310 + - tomli >=1.1.0 + - typing_extensions >=4.6.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mypy?source=hash-mapping + size: 9302149 + timestamp: 1748547424712 +- conda: https://prefix.dev/conda-forge/osx-arm64/mypy-1.16.0-py313h90d716c_0.conda + sha256: a37d65ad2e837bc86eff91a0bf15ea86d6d64d7bb52dbf2720334314563cae50 + md5: 4946c89919f258c1aad6000225b729a6 + depends: + - __osx >=11.0 + - mypy_extensions >=1.0.0 + - pathspec >=0.9.0 + - psutil >=4.0 + - python >=3.13,<3.14.0a0 + - python >=3.13,<3.14.0a0 *_cp313 + - python_abi 3.13.* *_cp313 + - typing_extensions >=4.6.0 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mypy?source=compressed-mapping + size: 10453519 + timestamp: 1748547483049 +- conda: https://prefix.dev/conda-forge/win-64/mypy-1.16.0-py310ha8f682b_0.conda + sha256: 240740e6e003851f79494e3d53abda4799854b874dfeaee01318def43fe16a12 + md5: 4c1035de8a27a8684c821547428bd614 + depends: + - mypy_extensions >=1.0.0 + - pathspec >=0.9.0 + - psutil >=4.0 + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + - tomli >=1.1.0 + - typing_extensions >=4.6.0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mypy?source=hash-mapping + size: 9675989 + timestamp: 1748547662848 +- conda: https://prefix.dev/conda-forge/win-64/mypy-1.16.0-py313ha7868ed_0.conda + sha256: 96f238306b14960b379570a209a864f448869b0c19a52b7ac5ac37d07c8ae797 + md5: ae82bb456e3d670e21deac8b067fdc45 + depends: + - mypy_extensions >=1.0.0 + - pathspec >=0.9.0 + - psutil >=4.0 + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + - typing_extensions >=4.6.0 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: MIT + license_family: MIT + purls: + - pkg:pypi/mypy?source=hash-mapping + size: 8496738 + timestamp: 1748547465206 - conda: https://prefix.dev/conda-forge/noarch/mypy_extensions-1.1.0-pyha770c72_0.conda sha256: 6ed158e4e5dd8f6a10ad9e525631e35cee8557718f83de7a4e3966b1f772c4b1 md5: e9c622e0d00fa24a6292279af3ab6d06 @@ -8718,6 +8849,17 @@ packages: - pkg:pypi/partd?source=hash-mapping size: 20884 timestamp: 1715026639309 +- conda: https://prefix.dev/conda-forge/noarch/pathspec-0.12.1-pyhd8ed1ab_1.conda + sha256: 9f64009cdf5b8e529995f18e03665b03f5d07c0b17445b8badef45bde76249ee + md5: 617f15191456cc6a13db418a275435e5 + depends: + - python >=3.9 + license: MPL-2.0 + license_family: MOZILLA + purls: + - pkg:pypi/pathspec?source=hash-mapping + size: 41075 + timestamp: 1733233471940 - conda: https://prefix.dev/conda-forge/noarch/pexpect-4.9.0-pyhd8ed1ab_1.conda sha256: 202af1de83b585d36445dc1fda94266697341994d1a3328fabde4989e1b3d07a md5: d0d408b1f18883a944376da5cf8101ea @@ -8793,6 +8935,118 @@ packages: - pkg:pypi/prompt-toolkit?source=compressed-mapping size: 271841 timestamp: 1744724188108 +- conda: https://prefix.dev/conda-forge/linux-64/psutil-7.0.0-py310ha75aee5_0.conda + sha256: 31e46270c73cac2b24a7f3462ca03eb39f21cbfdb713b0d41eb61c00867eabe9 + md5: da7d592394ff9084a23f62a1186451a2 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/psutil?source=compressed-mapping + size: 354476 + timestamp: 1740663252954 +- conda: https://prefix.dev/conda-forge/linux-64/psutil-7.0.0-py313h536fd9c_0.conda + sha256: 1b39f0ce5a345779d70c885664d77b5f8ef49f7378829bd7286a7fb98b7ea852 + md5: 8f315d1fce04a046c1b93fa6e536661d + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc >=13 + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/psutil?source=hash-mapping + size: 475101 + timestamp: 1740663284505 +- conda: https://prefix.dev/conda-forge/osx-64/psutil-7.0.0-py310hbb8c376_0.conda + sha256: 614c230961fab2ed8f7087fa81ae0cb5c6a6b3b9aea6d7d021dfad38c0aa349c + md5: c1d3e75575208aa864c8f0ae1ed6842e + depends: + - __osx >=10.13 + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/psutil?source=hash-mapping + size: 360590 + timestamp: 1740663319060 +- conda: https://prefix.dev/conda-forge/osx-64/psutil-7.0.0-py313h63b0ddb_0.conda + sha256: b117f61eaf3d5fb640d773c3021f222c833a69c2ac123d7f4b028b3e5d638dd4 + md5: 2c8969aaee2cf24bc8931f5fc36cccfd + depends: + - __osx >=10.13 + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/psutil?source=hash-mapping + size: 482494 + timestamp: 1740663492867 +- conda: https://prefix.dev/conda-forge/osx-arm64/psutil-7.0.0-py310h078409c_0.conda + sha256: c4aa4d0e144691383a88214ef02cc67909fccd5885601bafc9eaaf8bbe1c2877 + md5: 0079de80b6bf6e1c5c9ea067dce6bb05 + depends: + - __osx >=11.0 + - python >=3.10,<3.11.0a0 + - python >=3.10,<3.11.0a0 *_cpython + - python_abi 3.10.* *_cp310 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/psutil?source=hash-mapping + size: 363458 + timestamp: 1740663509903 +- conda: https://prefix.dev/conda-forge/osx-arm64/psutil-7.0.0-py313h90d716c_0.conda + sha256: a3d8376cf24ee336f63d3e6639485b68c592cf5ed3e1501ac430081be055acf9 + md5: 21105780750e89c761d1c72dc5304930 + depends: + - __osx >=11.0 + - python >=3.13,<3.14.0a0 + - python >=3.13,<3.14.0a0 *_cp313 + - python_abi 3.13.* *_cp313 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/psutil?source=hash-mapping + size: 484139 + timestamp: 1740663381126 +- conda: https://prefix.dev/conda-forge/win-64/psutil-7.0.0-py310ha8f682b_0.conda + sha256: 61c016c40848168bc565ceb8f3a78ad2d9288ffbe4236bcec312ef554f1caef2 + md5: ec78bb694e0ea34958e8f479e723499e + depends: + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/psutil?source=hash-mapping + size: 369926 + timestamp: 1740663706146 +- conda: https://prefix.dev/conda-forge/win-64/psutil-7.0.0-py313ha7868ed_0.conda + sha256: d8e5d86e939d5f308c7922835a94458afb29d81c90b5d43c43a5537c9c7adbc1 + md5: 3cdf99cf98b01856af9f26c5d8036353 + depends: + - python >=3.13,<3.14.0a0 + - python_abi 3.13.* *_cp313 + - ucrt >=10.0.20348.0 + - vc >=14.2,<15 + - vc14_runtime >=14.29.30139 + license: BSD-3-Clause + license_family: BSD + purls: + - pkg:pypi/psutil?source=hash-mapping + size: 491314 + timestamp: 1740663777370 - conda: https://prefix.dev/conda-forge/noarch/ptyprocess-0.7.0-pyhd8ed1ab_1.conda sha256: a7713dfe30faf17508ec359e0bc7e0983f5d94682492469bd462cdaae9c64d83 md5: 7d9daffbb8d8e0af0f769dbbcd173a54 diff --git a/pyproject.toml b/pyproject.toml index 7a415f01..36e25425 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ array-api-extra = { path = ".", editable = true } typing-extensions = ">=4.13.2" pre-commit = ">=4.2.0" pylint = ">=3.3.7" -basedmypy = ">=2.10.0" +mypy = ">=1.16.0" basedpyright = ">=1.29.2" numpydoc = ">=1.8.0,<2" # import dependencies for mypy: @@ -227,16 +227,17 @@ python_version = "3.10" warn_unused_configs = true strict = true enable_error_code = ["ignore-without-code", "truthy-bool"] -# https://github.com/data-apis/array-api-typing -disallow_any_expr = false -# false positives with input validation -disable_error_code = ["redundant-expr", "unreachable", "no-any-return"] +disable_error_code = ["no-any-return"] [[tool.mypy.overrides]] # slow or unavailable on Windows; do not add to the lint env module = ["cupy.*", "jax.*", "sparse.*", "torch.*"] ignore_missing_imports = true +[[tool.mypy.overrides]] +module = ["tests/*"] +disable_error_code = ["no-untyped-def"] # test(...) without -> None + # pyright [tool.basedpyright] diff --git a/src/array_api_extra/_lib/_at.py b/src/array_api_extra/_lib/_at.py index 870884b8..fb2d6ab7 100644 --- a/src/array_api_extra/_lib/_at.py +++ b/src/array_api_extra/_lib/_at.py @@ -37,7 +37,7 @@ class _AtOp(Enum): MAX = "max" # @override from Python 3.12 - def __str__(self) -> str: # type: ignore[explicit-override] # pyright: ignore[reportImplicitOverride] + def __str__(self) -> str: # pyright: ignore[reportImplicitOverride] """ Return string representation (useful for pytest logs). diff --git a/src/array_api_extra/_lib/_backends.py b/src/array_api_extra/_lib/_backends.py index f64e1479..68bef24b 100644 --- a/src/array_api_extra/_lib/_backends.py +++ b/src/array_api_extra/_lib/_backends.py @@ -30,7 +30,7 @@ class Backend(Enum): # numpydoc ignore=PR02 JAX = "jax.numpy" JAX_GPU = "jax.numpy:gpu" - def __str__(self) -> str: # type: ignore[explicit-override] # pyright: ignore[reportImplicitOverride] # numpydoc ignore=RT01 + def __str__(self) -> str: # pyright: ignore[reportImplicitOverride] # numpydoc ignore=RT01 """Pretty-print parameterized test names.""" return ( self.name.lower().replace("_gpu", ":gpu").replace("_readonly", ":readonly") diff --git a/src/array_api_extra/_lib/_funcs.py b/src/array_api_extra/_lib/_funcs.py index 69dfe6a4..cf1a894a 100644 --- a/src/array_api_extra/_lib/_funcs.py +++ b/src/array_api_extra/_lib/_funcs.py @@ -34,7 +34,7 @@ @overload -def apply_where( # type: ignore[explicit-any,decorated-any] # numpydoc ignore=GL08 +def apply_where( # numpydoc ignore=GL08 cond: Array, args: Array | tuple[Array, ...], f1: Callable[..., Array], @@ -46,7 +46,7 @@ def apply_where( # type: ignore[explicit-any,decorated-any] # numpydoc ignore=G @overload -def apply_where( # type: ignore[explicit-any,decorated-any] # numpydoc ignore=GL08 +def apply_where( # numpydoc ignore=GL08 cond: Array, args: Array | tuple[Array, ...], f1: Callable[..., Array], @@ -57,7 +57,7 @@ def apply_where( # type: ignore[explicit-any,decorated-any] # numpydoc ignore=G ) -> Array: ... -def apply_where( # type: ignore[explicit-any] # numpydoc ignore=PR01,PR02 +def apply_where( # numpydoc ignore=PR01,PR02 cond: Array, args: Array | tuple[Array, ...], f1: Callable[..., Array], @@ -143,7 +143,7 @@ def apply_where( # type: ignore[explicit-any] # numpydoc ignore=PR01,PR02 return _apply_where(cond, f1, f2, fill_value, *args_, xp=xp) -def _apply_where( # type: ignore[explicit-any] # numpydoc ignore=PR01,RT01 +def _apply_where( # numpydoc ignore=PR01,RT01 cond: Array, f1: Callable[..., Array], f2: Callable[..., Array] | None, @@ -813,8 +813,7 @@ def pad( else: pad_width_seq = cast(list[tuple[int, int]], list(pad_width)) - # https://github.com/python/typeshed/issues/13376 - slices: list[slice] = [] # type: ignore[explicit-any] + slices: list[slice] = [] newshape: list[int] = [] for ax, w_tpl in enumerate(pad_width_seq): if len(w_tpl) != 2: @@ -826,6 +825,7 @@ def pad( if w_tpl[0] == 0 and w_tpl[1] == 0: sl = slice(None, None, None) else: + stop: int | None start, stop = w_tpl stop = None if stop == 0 else -stop diff --git a/src/array_api_extra/_lib/_lazy.py b/src/array_api_extra/_lib/_lazy.py index d13d08f8..dc7c0039 100644 --- a/src/array_api_extra/_lib/_lazy.py +++ b/src/array_api_extra/_lib/_lazy.py @@ -22,7 +22,7 @@ import numpy as np from numpy.typing import ArrayLike - NumPyObject: TypeAlias = np.ndarray[Any, Any] | np.generic # type: ignore[explicit-any] + NumPyObject: TypeAlias = np.ndarray[Any, Any] | np.generic else: # Sphinx hack NumPyObject = Any @@ -31,7 +31,7 @@ @overload -def lazy_apply( # type: ignore[decorated-any, valid-type] +def lazy_apply( # type: ignore[valid-type] func: Callable[P, Array | ArrayLike], *args: Array | complex | None, shape: tuple[int | None, ...] | None = None, @@ -43,7 +43,7 @@ def lazy_apply( # type: ignore[decorated-any, valid-type] @overload -def lazy_apply( # type: ignore[decorated-any, valid-type] +def lazy_apply( # type: ignore[valid-type] func: Callable[P, Sequence[Array | ArrayLike]], *args: Array | complex | None, shape: Sequence[tuple[int | None, ...]], @@ -313,7 +313,7 @@ def _is_jax_jit_enabled(xp: ModuleType) -> bool: # numpydoc ignore=PR01,RT01 return True -def _lazy_apply_wrapper( # type: ignore[explicit-any] # numpydoc ignore=PR01,RT01 +def _lazy_apply_wrapper( # numpydoc ignore=PR01,RT01 func: Callable[..., Array | ArrayLike | Sequence[Array | ArrayLike]], as_numpy: bool, multi_output: bool, @@ -331,7 +331,7 @@ def _lazy_apply_wrapper( # type: ignore[explicit-any] # numpydoc ignore=PR01,R # On Dask, @wraps causes the graph key to contain the wrapped function's name @wraps(func) - def wrapper( # type: ignore[decorated-any,explicit-any] + def wrapper( *args: Array | complex | None, **kwargs: Any ) -> tuple[Array, ...]: # numpydoc ignore=GL08 args_list = [] @@ -343,7 +343,7 @@ def wrapper( # type: ignore[decorated-any,explicit-any] if as_numpy: import numpy as np - arg = cast(Array, np.asarray(arg)) # type: ignore[bad-cast] # noqa: PLW2901 + arg = cast(Array, np.asarray(arg)) # noqa: PLW2901 args_list.append(arg) assert device is not None diff --git a/src/array_api_extra/_lib/_testing.py b/src/array_api_extra/_lib/_testing.py index 16a9d102..30e2f1ef 100644 --- a/src/array_api_extra/_lib/_testing.py +++ b/src/array_api_extra/_lib/_testing.py @@ -110,7 +110,7 @@ def _is_materializable(x: Array) -> bool: return not is_torch_array(x) or x.device.type != "meta" # type: ignore[attr-defined] # pyright: ignore[reportAttributeAccessIssue] -def as_numpy_array(array: Array, *, xp: ModuleType) -> np.typing.NDArray[Any]: # type: ignore[explicit-any] +def as_numpy_array(array: Array, *, xp: ModuleType) -> np.typing.NDArray[Any]: """ Convert array to NumPy, bypassing GPU-CPU transfer guards and densification guards. """ diff --git a/src/array_api_extra/_lib/_utils/_compat.pyi b/src/array_api_extra/_lib/_utils/_compat.pyi index 48addda4..95c6bc8a 100644 --- a/src/array_api_extra/_lib/_utils/_compat.pyi +++ b/src/array_api_extra/_lib/_utils/_compat.pyi @@ -36,7 +36,7 @@ def is_torch_array(x: object, /) -> TypeGuard[Array]: ... def is_lazy_array(x: object, /) -> TypeGuard[Array]: ... def is_writeable_array(x: object, /) -> TypeGuard[Array]: ... def size(x: Array, /) -> int | None: ... -def to_device( # type: ignore[explicit-any] +def to_device( x: Array, device: Device, # pylint: disable=redefined-outer-name /, diff --git a/src/array_api_extra/_lib/_utils/_helpers.py b/src/array_api_extra/_lib/_utils/_helpers.py index 7851d32f..d177b376 100644 --- a/src/array_api_extra/_lib/_utils/_helpers.py +++ b/src/array_api_extra/_lib/_utils/_helpers.py @@ -210,7 +210,7 @@ def asarrays( float: ("real floating", "complex floating"), complex: "complex floating", } - kind = same_dtype[type(cast(complex, b))] # type: ignore[index] + kind = same_dtype[type(cast(complex, b))] if xp.isdtype(a.dtype, kind): xb = xp.asarray(b, dtype=a.dtype) else: @@ -458,7 +458,7 @@ def persistent_id( return instances, (f.getvalue(), *rest) -def pickle_unflatten(instances: Iterable[object], rest: FlattenRest) -> Any: # type: ignore[explicit-any] +def pickle_unflatten(instances: Iterable[object], rest: FlattenRest) -> Any: """ Reverse of ``pickle_flatten``. @@ -521,7 +521,7 @@ def __init__(self, obj: T) -> None: # numpydoc ignore=GL08 self.obj = obj @classmethod - def _register(cls): # numpydoc ignore=SS06 + def _register(cls) -> None: # numpydoc ignore=SS06 """ Register upon first use instead of at import time, to avoid globally importing JAX. @@ -583,7 +583,7 @@ def f(x: Array, y: float, plus: bool) -> Array: import jax @jax.jit # type: ignore[misc] # pyright: ignore[reportUntypedFunctionDecorator] - def inner( # type: ignore[decorated-any,explicit-any] # numpydoc ignore=GL08 + def inner( # numpydoc ignore=GL08 wargs: _AutoJITWrapper[Any], ) -> _AutoJITWrapper[T]: args, kwargs = wargs.obj diff --git a/src/array_api_extra/_lib/_utils/_typing.pyi b/src/array_api_extra/_lib/_utils/_typing.pyi index e32a59bd..35c255fc 100644 --- a/src/array_api_extra/_lib/_utils/_typing.pyi +++ b/src/array_api_extra/_lib/_utils/_typing.pyi @@ -95,10 +95,10 @@ class DType(Protocol): # pylint: disable=missing-class-docstring class Device(Protocol): # pylint: disable=missing-class-docstring pass -SetIndex: TypeAlias = ( # type: ignore[explicit-any] +SetIndex: TypeAlias = ( int | slice | EllipsisType | Array | tuple[int | slice | EllipsisType | Array, ...] ) -GetIndex: TypeAlias = ( # type: ignore[explicit-any] +GetIndex: TypeAlias = ( SetIndex | None | tuple[int | slice | EllipsisType | None | Array, ...] ) diff --git a/src/array_api_extra/testing.py b/src/array_api_extra/testing.py index 3979f9dd..bb310467 100644 --- a/src/array_api_extra/testing.py +++ b/src/array_api_extra/testing.py @@ -36,7 +36,7 @@ def override(func): P = ParamSpec("P") T = TypeVar("T") -_ufuncs_tags: dict[object, dict[str, Any]] = {} # type: ignore[explicit-any] +_ufuncs_tags: dict[object, dict[str, Any]] = {} class Deprecated(enum.Enum): @@ -48,7 +48,7 @@ class Deprecated(enum.Enum): DEPRECATED = Deprecated.DEPRECATED -def lazy_xp_function( # type: ignore[explicit-any] +def lazy_xp_function( func: Callable[..., Any], *, allow_dask_compute: bool | int = False, @@ -257,12 +257,12 @@ def xp(request, monkeypatch): mod = cast(ModuleType, request.module) mods = [mod, *cast(list[ModuleType], getattr(mod, "lazy_xp_modules", []))] - def iter_tagged() -> ( # type: ignore[explicit-any] + def iter_tagged() -> ( Iterator[tuple[ModuleType, str, Callable[..., Any], dict[str, Any]]] ): for mod in mods: for name, func in mod.__dict__.items(): - tags: dict[str, Any] | None = None # type: ignore[explicit-any] + tags: dict[str, Any] | None = None with contextlib.suppress(AttributeError): tags = func._lazy_xp_function # pylint: disable=protected-access if tags is None: @@ -313,7 +313,9 @@ def __init__(self, max_count: int, msg: str): # numpydoc ignore=GL08 self.msg = msg @override - def __call__(self, dsk: Graph, keys: Sequence[Key] | Key, **kwargs: Any) -> Any: # type: ignore[decorated-any,explicit-any] # numpydoc ignore=GL08 + def __call__( + self, dsk: Graph, keys: Sequence[Key] | Key, **kwargs: Any + ) -> Any: # numpydoc ignore=GL08 import dask self.count += 1 @@ -321,7 +323,7 @@ def __call__(self, dsk: Graph, keys: Sequence[Key] | Key, **kwargs: Any) -> Any: # offending line in the user's code assert self.count <= self.max_count, self.msg - return dask.get(dsk, keys, **kwargs) # type: ignore[attr-defined,no-untyped-call] # pyright: ignore[reportPrivateImportUsage] + return dask.get(dsk, keys, **kwargs) # type: ignore[attr-defined] # pyright: ignore[reportPrivateImportUsage] def _dask_wrap( @@ -354,7 +356,7 @@ def wrapper(*args: P.args, **kwargs: P.kwargs) -> T: # numpydoc ignore=GL08 # `pytest.raises` and `pytest.warns` to work as expected. Note that this would # not work on scheduler='distributed', as it would not block. arrays, rest = pickle_flatten(out, da.Array) - arrays = dask.persist(arrays, scheduler="threads")[0] # type: ignore[attr-defined,no-untyped-call,func-returns-value,index] # pyright: ignore[reportPrivateImportUsage] + arrays = dask.persist(arrays, scheduler="threads")[0] # type: ignore[attr-defined,no-untyped-call] # pyright: ignore[reportPrivateImportUsage] return pickle_unflatten(arrays, rest) # pyright: ignore[reportUnknownArgumentType] return wrapper diff --git a/tests/test_at.py b/tests/test_at.py index 7294a7c4..04b71b70 100644 --- a/tests/test_at.py +++ b/tests/test_at.py @@ -40,7 +40,7 @@ def at_op( just a workaround for when one wants to apply jax.jit to `at()` directly, which is not a common use case. """ - meth = cast(Callable[..., Array], getattr(at(x, idx), op.value)) # type: ignore[explicit-any] + meth = cast(Callable[..., Array], getattr(at(x, idx), op.value)) return meth(y, copy=copy, xp=xp) @@ -157,7 +157,7 @@ def test_copy_default(xp: ModuleType, library: Backend, op: _AtOp): """ x = xp.asarray([1.0, 10.0, 20.0]) expect_copy = not is_writeable_array(x) - meth = cast(Callable[..., Array], getattr(at(x)[:2], op.value)) # type: ignore[explicit-any] + meth = cast(Callable[..., Array], getattr(at(x)[:2], op.value)) with assert_copy(x, None, expect_copy): _ = meth(2.0) @@ -166,7 +166,7 @@ def test_copy_default(xp: ModuleType, library: Backend, op: _AtOp): # even if the arrays are writeable. expect_copy = not is_writeable_array(x) or library is Backend.DASK idx = xp.asarray([True, True, False]) - meth = cast(Callable[..., Array], getattr(at(x, idx), op.value)) # type: ignore[explicit-any] + meth = cast(Callable[..., Array], getattr(at(x, idx), op.value)) with assert_copy(x, None, expect_copy): _ = meth(2.0) @@ -178,7 +178,7 @@ def test_copy_invalid(): def test_xp(): - a = cast(Array, np.asarray([1, 2, 3])) # type: ignore[bad-cast] + a = cast(Array, np.asarray([1, 2, 3])) _ = at(a, 0).set(4, xp=np) _ = at(a, 0).add(4, xp=np) _ = at(a, 0).subtract(4, xp=np) @@ -190,7 +190,7 @@ def test_xp(): def test_alternate_index_syntax(): - xp = cast(ModuleType, np) # pyright: ignore[reportInvalidCast] + xp = cast(ModuleType, np) # type: ignore[redundant-cast] # pyright: ignore[reportInvalidCast] a = cast(Array, xp.asarray([1, 2, 3])) xp_assert_equal(at(a, 0).set(4, copy=True), xp.asarray([4, 2, 3])) xp_assert_equal(at(a)[0].set(4, copy=True), xp.asarray([4, 2, 3])) diff --git a/tests/test_funcs.py b/tests/test_funcs.py index 88fb580f..6e80a61d 100644 --- a/tests/test_funcs.py +++ b/tests/test_funcs.py @@ -36,9 +36,6 @@ from .conftest import NUMPY_VERSION -# some xp backends are untyped -# mypy: disable-error-code=no-untyped-def - lazy_xp_function(apply_where) lazy_xp_function(atleast_nd) lazy_xp_function(cov) @@ -213,7 +210,7 @@ def test_device(self, xp: ModuleType, device: Device): p=st.floats(min_value=0, max_value=1), data=st.data(), ) - def test_hypothesis( # type: ignore[explicit-any,decorated-any] + def test_hypothesis( self, n_arrays: int, rng_seed: int, diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 4a545df8..275ca519 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -32,7 +32,6 @@ def override(func): return func -# mypy: disable-error-code=no-untyped-usage T = TypeVar("T") @@ -387,7 +386,7 @@ def test_static_hashable(self, jnp: ModuleType): """Static argument/return value is hashable, but not serializable""" class C: - def __reduce__(self) -> object: # type: ignore[explicit-override,override] # pyright: ignore[reportIncompatibleMethodOverride,reportImplicitOverride] + def __reduce__(self) -> object: # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride,reportImplicitOverride] raise Exception() @jax_autojit @@ -399,12 +398,12 @@ def f(x: object) -> object: assert out is inp # Serializable opaque input contains non-serializable object plus array - inp = Wrapper((C(), jnp.asarray([1, 2]))) - out = f(inp) + winp = Wrapper((C(), jnp.asarray([1, 2]))) + out = f(winp) assert isinstance(out, Wrapper) - assert out.x[0] is inp.x[0] - assert out.x[1] is not inp.x[1] - xp_assert_equal(out.x[1], inp.x[1]) # pyright: ignore[reportUnknownArgumentType] + assert out.x[0] is winp.x[0] + assert out.x[1] is not winp.x[1] + xp_assert_equal(out.x[1], winp.x[1]) # pyright: ignore[reportUnknownArgumentType] def test_arraylikes_are_static(self): pytest.importorskip("jax") diff --git a/tests/test_lazy.py b/tests/test_lazy.py index f97062f0..503e180f 100644 --- a/tests/test_lazy.py +++ b/tests/test_lazy.py @@ -141,7 +141,7 @@ def f(x: Array) -> Array: xp = array_namespace(x) return xp.sum(x, axis=0) + x - x_np = cast(Array, np.arange(15).reshape(5, 3)) # type: ignore[bad-cast] + x_np = cast(Array, np.arange(15).reshape(5, 3)) expect = da.asarray(f(x_np)) x_da = da.asarray(x_np).rechunk(3) diff --git a/tests/test_testing.py b/tests/test_testing.py index 5a123db9..33c36c12 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -20,7 +20,6 @@ from array_api_extra._lib._utils._typing import Array, Device from array_api_extra.testing import lazy_xp_function -# mypy: disable-error-code="decorated-any, explicit-any" # pyright: reportUnknownParameterType=false,reportMissingParameterType=false @@ -295,7 +294,7 @@ def test_lazy_xp_function_deprecated_static_argnames(): # Test an arbitrary Cython ufunc (@cython.vectorize). # When SCIPY_ARRAY_API is not set, this is the same as # scipy.special.erf. - from scipy.special._ufuncs import erf # type: ignore[import-not-found] + from scipy.special._ufuncs import erf # type: ignore[import-untyped] lazy_xp_function(erf) # pyright: ignore[reportUnknownArgumentType] except ImportError: