mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01: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:
parent
2490ac561f
commit
8a45befcec
|
|
@ -57,12 +57,12 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
|
||||||
elif [ "$ANACONDA_PYTHON_VERSION" = "3.10" ]; then
|
elif [ "$ANACONDA_PYTHON_VERSION" = "3.10" ]; then
|
||||||
conda_install numpy=1.21.2 ${CONDA_COMMON_DEPS}
|
conda_install numpy=1.21.2 ${CONDA_COMMON_DEPS}
|
||||||
elif [ "$ANACONDA_PYTHON_VERSION" = "3.9" ]; then
|
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
|
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
|
else
|
||||||
# Install `typing-extensions` for 3.7
|
# 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
|
fi
|
||||||
|
|
||||||
# This is only supported in 3.8 upward
|
# 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=2021.2.0
|
||||||
mkl-include=2021.2.0
|
mkl-include=2021.2.0
|
||||||
numpy=1.18.5
|
numpy=1.21.2
|
||||||
pyyaml=5.3
|
pyyaml=5.3
|
||||||
setuptools=46.0.0
|
setuptools=46.0.0
|
||||||
cmake=3.22.*
|
cmake=3.22.*
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[mypy]
|
[mypy]
|
||||||
plugins = mypy_plugins/check_mypy_version.py
|
plugins = mypy_plugins/check_mypy_version.py, numpy.typing.mypy_plugin
|
||||||
|
|
||||||
cache_dir = .mypy_cache/nofollow
|
cache_dir = .mypy_cache/nofollow
|
||||||
warn_unused_configs = True
|
warn_unused_configs = True
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
[mypy]
|
[mypy]
|
||||||
python_version = 3.8
|
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
|
cache_dir = .mypy_cache/strict
|
||||||
strict_optional = True
|
strict_optional = True
|
||||||
|
|
|
||||||
2
mypy.ini
2
mypy.ini
|
|
@ -2,7 +2,7 @@
|
||||||
# test_run_mypy in test/test_type_hints.py uses this string)
|
# test_run_mypy in test/test_type_hints.py uses this string)
|
||||||
|
|
||||||
[mypy]
|
[mypy]
|
||||||
plugins = mypy_plugins/check_mypy_version.py
|
plugins = mypy_plugins/check_mypy_version.py, numpy.typing.mypy_plugin
|
||||||
|
|
||||||
cache_dir = .mypy_cache/normal
|
cache_dir = .mypy_cache/normal
|
||||||
warn_unused_configs = True
|
warn_unused_configs = True
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user