From c5ca7d3a766f84d58119d18d8df738975204c7a9 Mon Sep 17 00:00:00 2001 From: Jack He Date: Fri, 24 Apr 2020 10:58:38 -0700 Subject: Exclude deleted Python files from YAPF checker Test: upload a commit with deleted Python file Change-Id: I9cbf427eeafec992d1a8ecc0030ec5effcf9f3de --- system/tools/scripts/yapf_checker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'system/tools/scripts/yapf_checker.py') diff --git a/system/tools/scripts/yapf_checker.py b/system/tools/scripts/yapf_checker.py index 86f1f39632..f6dd2c9d25 100755 --- a/system/tools/scripts/yapf_checker.py +++ b/system/tools/scripts/yapf_checker.py @@ -23,7 +23,9 @@ PYTHONPATH_KEY = 'PYTHONPATH' COMMIT_ID_ENV_KEY = 'PREUPLOAD_COMMIT' ANDROID_BUILD_TOP_KEY = 'ANDROID_BUILD_TOP' DEFAULT_YAPF_DIR = 'external/yapf' -GIT_COMMAND = ['git', 'diff-tree', '--no-commit-id', '--name-only'] +GIT_COMMAND = [ + 'git', 'diff-tree', '--no-commit-id', '--name-only', '--diff-filter=d' +] def main(): -- cgit v1.2.3