Apply changes to fix python linting errors
This commit is contained in:
parent
4b71d79c97
commit
22d00dcd47
22 changed files with 58 additions and 49 deletions
|
@ -22,7 +22,7 @@ except ImportError:
|
|||
import urllib.request as urllib2
|
||||
from urllib.error import HTTPError
|
||||
try:
|
||||
import typing
|
||||
import typing # noqa: F401 FIXME: py2
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
@ -152,8 +152,8 @@ def update_latest(
|
|||
latest = json.load(f, object_pairs_hook=collections.OrderedDict)
|
||||
|
||||
current_status = {
|
||||
os: read_current_status(current_commit, 'history/' + os + '.tsv')
|
||||
for os in ['windows', 'linux']
|
||||
os_: read_current_status(current_commit, 'history/' + os_ + '.tsv')
|
||||
for os_ in ['windows', 'linux']
|
||||
}
|
||||
|
||||
slug = 'rust-lang/rust'
|
||||
|
@ -170,10 +170,10 @@ def update_latest(
|
|||
changed = False
|
||||
create_issue_for_status = None # set to the status that caused the issue
|
||||
|
||||
for os, s in current_status.items():
|
||||
old = status[os]
|
||||
for os_, s in current_status.items():
|
||||
old = status[os_]
|
||||
new = s.get(tool, old)
|
||||
status[os] = new
|
||||
status[os_] = new
|
||||
maintainers = ' '.join('@'+name for name in MAINTAINERS.get(tool, ()))
|
||||
# comparing the strings, but they are ordered appropriately:
|
||||
# "test-pass" > "test-fail" > "build-fail"
|
||||
|
@ -181,12 +181,12 @@ def update_latest(
|
|||
# things got fixed or at least the status quo improved
|
||||
changed = True
|
||||
message += '🎉 {} on {}: {} → {} (cc {}).\n' \
|
||||
.format(tool, os, old, new, maintainers)
|
||||
.format(tool, os_, old, new, maintainers)
|
||||
elif new < old:
|
||||
# tests or builds are failing and were not failing before
|
||||
changed = True
|
||||
title = '💔 {} on {}: {} → {}' \
|
||||
.format(tool, os, old, new)
|
||||
.format(tool, os_, old, new)
|
||||
message += '{} (cc {}).\n' \
|
||||
.format(title, maintainers)
|
||||
# See if we need to create an issue.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue