Modernize code for easier Python 3 port
- Replace print statement with function call - Replace except ..., ...: syntax with except ... as ...: - Simplify obsolete try ... except ... code block - Replace some unicode calls with u-prefixed strings - Do not use `len(SEQUENCE)` to determine if a sequence is empty - Replace dictionary creation - Drop support for GObject static bindings
This commit is contained in:
@@ -59,9 +59,7 @@ retrieves and display accuraterip data from the given URL
|
||||
assert len(r.checksums) == r.num_tracks
|
||||
assert len(r.confidences) == r.num_tracks
|
||||
|
||||
entry = {}
|
||||
entry["confidence"] = r.confidences[track]
|
||||
entry["response"] = i + 1
|
||||
entry = {"confidence": r.confidences[track], "response": i + 1}
|
||||
checksum = r.checksums[track]
|
||||
if checksum in checksums:
|
||||
checksums[checksum].append(entry)
|
||||
|
||||
Reference in New Issue
Block a user