Unverified Commit b4b1b75a authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] add mypy to linting task (#3868)

parent d4658fbb
...@@ -48,10 +48,11 @@ if [[ $TASK == "lint" ]]; then ...@@ -48,10 +48,11 @@ if [[ $TASK == "lint" ]]; then
-c conda-forge \ -c conda-forge \
libxml2 \ libxml2 \
"r-lintr>=2.0" "r-lintr>=2.0"
pip install --user cpplint pip install --user cpplint mypy
echo "Linting Python code" echo "Linting Python code"
pycodestyle --ignore=E501,W503 --exclude=./.nuget,./external_libs . || exit -1 pycodestyle --ignore=E501,W503 --exclude=./.nuget,./external_libs . || exit -1
pydocstyle --convention=numpy --add-ignore=D105 --match-dir="^(?!^external_libs|test|example).*" --match="(?!^test_|setup).*\.py" . || exit -1 pydocstyle --convention=numpy --add-ignore=D105 --match-dir="^(?!^external_libs|test|example).*" --match="(?!^test_|setup).*\.py" . || exit -1
mypy --ignore-missing-imports python-package/ || true
echo "Linting R code" echo "Linting R code"
Rscript ${BUILD_DIRECTORY}/.ci/lint_r_code.R ${BUILD_DIRECTORY} || exit -1 Rscript ${BUILD_DIRECTORY}/.ci/lint_r_code.R ${BUILD_DIRECTORY} || exit -1
echo "Linting C++ code" echo "Linting C++ code"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment