Python lint: Use flake8 --extend-ignore instead of --ignore (#1498)

This commit is contained in:
Christian Clauss
2024-12-07 00:20:31 +01:00
committed by GitHub
parent b644e2e6bb
commit 095c488961
9 changed files with 27 additions and 68 deletions

View File

@@ -8,12 +8,14 @@ import sys
EMSCRIPTEN_RELEASES_GIT = 'https://chromium.googlesource.com/emscripten-releases'
TAGFILE = 'emscripten-releases-tags.json'
def get_latest_hash(tagfile):
with open(tagfile) as f:
versions = json.load(f)
latest = versions['aliases']['latest']
return versions['releases'][latest]
def get_latest_emscripten(tagfile):
latest = get_latest_hash(tagfile)
if not os.path.isdir('emscripten-releases'):
@@ -30,6 +32,7 @@ def get_latest_emscripten(tagfile):
if len(tokens) and tokens[0] == 'emscripten':
return tokens[2]
if __name__ == '__main__':
emscripten_hash = get_latest_emscripten(TAGFILE)
print('Emscripten revision ' + emscripten_hash)