summaryrefslogtreecommitdiff
path: root/system/tools/scripts/yapf_checker.py
diff options
context:
space:
mode:
authorJack He <siyuanh@google.com>2020-04-24 10:58:38 -0700
committerJack He <siyuanh@google.com>2020-04-24 10:59:55 -0700
commitc5ca7d3a766f84d58119d18d8df738975204c7a9 (patch)
treee17f4c6718b339b56d0a4300d2a1d6f21d3d1e19 /system/tools/scripts/yapf_checker.py
parent974abb3113992dad597226b1c3464187da4e1da7 (diff)
Exclude deleted Python files from YAPF checker
Test: upload a commit with deleted Python file Change-Id: I9cbf427eeafec992d1a8ecc0030ec5effcf9f3de
Diffstat (limited to 'system/tools/scripts/yapf_checker.py')
-rwxr-xr-xsystem/tools/scripts/yapf_checker.py4
1 files changed, 3 insertions, 1 deletions
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():