mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[reland] add numpy typing plugin to mypy config (#94525)
reland of https://github.com/pytorch/pytorch/pull/92930 Pull Request resolved: https://github.com/pytorch/pytorch/pull/94525 Approved by: https://github.com/huydhn
This commit is contained in:
committed by
PyTorch MergeBot
parent
2490ac561f
commit
8a45befcec
@ -57,12 +57,12 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
|
||||
elif [ "$ANACONDA_PYTHON_VERSION" = "3.10" ]; then
|
||||
conda_install numpy=1.21.2 ${CONDA_COMMON_DEPS}
|
||||
elif [ "$ANACONDA_PYTHON_VERSION" = "3.9" ]; then
|
||||
conda_install numpy=1.19.2 ${CONDA_COMMON_DEPS}
|
||||
conda_install numpy=1.21.2 ${CONDA_COMMON_DEPS}
|
||||
elif [ "$ANACONDA_PYTHON_VERSION" = "3.8" ]; then
|
||||
conda_install numpy=1.18.5 ${CONDA_COMMON_DEPS}
|
||||
conda_install numpy=1.21.2 ${CONDA_COMMON_DEPS}
|
||||
else
|
||||
# Install `typing-extensions` for 3.7
|
||||
conda_install numpy=1.18.5 ${CONDA_COMMON_DEPS} typing-extensions
|
||||
conda_install numpy=1.21.2 ${CONDA_COMMON_DEPS} typing-extensions
|
||||
fi
|
||||
|
||||
# This is only supported in 3.8 upward
|
||||
|
2
.github/requirements/conda-env-macOS-X64
vendored
2
.github/requirements/conda-env-macOS-X64
vendored
@ -1,6 +1,6 @@
|
||||
mkl=2021.2.0
|
||||
mkl-include=2021.2.0
|
||||
numpy=1.18.5
|
||||
numpy=1.21.2
|
||||
pyyaml=5.3
|
||||
setuptools=46.0.0
|
||||
cmake=3.22.*
|
||||
|
@ -1,5 +1,5 @@
|
||||
[mypy]
|
||||
plugins = mypy_plugins/check_mypy_version.py
|
||||
plugins = mypy_plugins/check_mypy_version.py, numpy.typing.mypy_plugin
|
||||
|
||||
cache_dir = .mypy_cache/nofollow
|
||||
warn_unused_configs = True
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
[mypy]
|
||||
python_version = 3.8
|
||||
plugins = mypy_plugins/check_mypy_version.py
|
||||
plugins = mypy_plugins/check_mypy_version.py, numpy.typing.mypy_plugin
|
||||
|
||||
cache_dir = .mypy_cache/strict
|
||||
strict_optional = True
|
||||
|
Reference in New Issue
Block a user