diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-05-27 15:10:52 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-01 06:38:26 -0400 |
commit | 2ab37eaf9668b5aacc953c6d01fcab9e4f181bf7 (patch) | |
tree | e0203c2f0fb181f6008efd23bb920ac1c2fc8e45 | |
parent | 4a7229ef361307e16574b85f71f473f936728890 (diff) | |
download | haskell-2ab37eaf9668b5aacc953c6d01fcab9e4f181bf7.tar.gz |
testsuite/perf_notes: Fix ill-typed assignments
-rw-r--r-- | testsuite/driver/perf_notes.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/testsuite/driver/perf_notes.py b/testsuite/driver/perf_notes.py index a468b7248c..c04c2da2c4 100644 --- a/testsuite/driver/perf_notes.py +++ b/testsuite/driver/perf_notes.py @@ -126,10 +126,11 @@ def get_perf_stats(commit: Union[GitRef, GitHash]=GitRef('HEAD'), except subprocess.CalledProcessError: return [] - log = log.strip('\n').split('\n') - log = list(filter(None, log)) - log = [parse_perf_stat(stat_str) for stat_str in log] - return log + return \ + [ parse_perf_stat(stat_str) + for stat_str in log.strip('\n').split('\n') + if stat_str != '' + ] # Check if a str is in a 40 character git commit hash. _commit_hash_re = re.compile('[0-9a-f]' * 40) |