diff options
author | Mehrdad Afshari <mmx@google.com> | 2018-01-02 14:40:00 -0800 |
---|---|---|
committer | Mehrdad Afshari <mmx@google.com> | 2018-01-02 14:40:00 -0800 |
commit | 87cd994b0477e98c976e7b321b3c1f52666ab5e0 (patch) | |
tree | 8590a82e599e0c763f32f835ef2bbb129871e75b /tools/github | |
parent | 63392f682e21543099926251b642cdcd0be2a17f (diff) |
Upgrade yapf to 0.20.0
Upgrade yapf version to 0.20.0 and reformat Python files.
Diffstat (limited to 'tools/github')
-rw-r--r-- | tools/github/pr_latency.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/github/pr_latency.py b/tools/github/pr_latency.py index 0131e60bbc..34870a5326 100644 --- a/tools/github/pr_latency.py +++ b/tools/github/pr_latency.py @@ -72,9 +72,13 @@ def output(pr, errors)) elif mode == 'csv': print(','.join([ - str(pr), str(base_time), str(test_time), str( - int((test_time - base_time).total_seconds())), str(successes), - str(failures), str(errors) + str(pr), + str(base_time), + str(test_time), + str(int((test_time - base_time).total_seconds())), + str(successes), + str(failures), + str(errors) ])) @@ -117,8 +121,7 @@ def get_status_data(statuses_url, system): if system == 'kokoro': string_in_target_url = 'kokoro' elif system == 'jenkins': string_in_target_url = 'grpc-testing' for status in statuses['statuses']: - if not status['target_url'] or string_in_target_url not in status[ - 'target_url']: + if not status['target_url'] or string_in_target_url not in status['target_url']: continue # Ignore jenkins if status['state'] == 'pending': return None elif status['state'] == 'success': successes += 1 @@ -130,8 +133,8 @@ def get_status_data(statuses_url, system): latest_datetime = max(latest_datetime, parse_timestamp(status['updated_at'])) # First status is the most recent one. - if any([successes, failures, errors]) and sum( - [successes, failures, errors]) > 15: + if any([successes, failures, errors + ]) and sum([successes, failures, errors]) > 15: return { 'latest_datetime': latest_datetime, 'successes': successes, |