diff --git a/.gitignore b/.gitignore index f71567cfee2..bac41ebf878 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ py3[0-9]_native/ a.out src/python/grpcio_*/LICENSE src/python/grpcio_status/grpc_status/google/rpc/status.proto +None +.pytype # Node installation output node_modules diff --git a/tools/run_tests/sanity/check_pytype.sh b/tools/run_tests/sanity/check_pytype.sh new file mode 100644 index 00000000000..c967afb8be1 --- /dev/null +++ b/tools/run_tests/sanity/check_pytype.sh @@ -0,0 +1,8 @@ +#! /bin/bash -ex + +JOBS=`nproc` || JOBS=4 +python3 -m pip install pytype==2019.11.27 + +for dir in src/python/grpcio*; do + python3 -m pytype --keep-going -j "$JOBS" --strict-import $dir +done diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml index 93aa516f2d6..8d0ebbd6dec 100644 --- a/tools/run_tests/sanity/sanity_tests.yaml +++ b/tools/run_tests/sanity/sanity_tests.yaml @@ -6,6 +6,7 @@ - script: tools/run_tests/sanity/check_deprecated_grpc++.py - script: tools/run_tests/sanity/check_owners.sh - script: tools/run_tests/sanity/check_port_platform.py +- script: tools/run_tests/sanity/check_pytype.sh - script: tools/run_tests/sanity/check_qps_scenario_changes.py - script: tools/run_tests/sanity/check_shellcheck.sh - script: tools/run_tests/sanity/check_submodules.sh