mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
replace itertools.izip with zip from six.moves
This commit is contained in:
parent
1f8e08d168
commit
31cca684f2
2 changed files with 5 additions and 5 deletions
|
|
@ -21,7 +21,8 @@ from __future__ import division, absolute_import, print_function
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
from itertools import tee, izip
|
from six.moves import zip
|
||||||
|
from itertools import tee
|
||||||
|
|
||||||
from beets import plugins, ui
|
from beets import plugins, ui
|
||||||
|
|
||||||
|
|
@ -37,7 +38,7 @@ def pairwise(iterable):
|
||||||
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
|
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
|
||||||
a, b = tee(iterable)
|
a, b = tee(iterable)
|
||||||
next(b, None)
|
next(b, None)
|
||||||
return izip(a, b)
|
return zip(a, b)
|
||||||
|
|
||||||
|
|
||||||
def span_from_str(span_str):
|
def span_from_str(span_str):
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@ from __future__ import division, absolute_import, print_function
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
import collections
|
import collections
|
||||||
import itertools
|
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
import re
|
import re
|
||||||
|
from six.moves import zip
|
||||||
|
|
||||||
from beets import logging
|
from beets import logging
|
||||||
from beets import ui
|
from beets import ui
|
||||||
|
|
@ -883,8 +883,7 @@ class ReplayGainPlugin(BeetsPlugin):
|
||||||
)
|
)
|
||||||
|
|
||||||
self.store_album_gain(album, album_gain.album_gain)
|
self.store_album_gain(album, album_gain.album_gain)
|
||||||
for item, track_gain in itertools.izip(album.items(),
|
for item, track_gain in zip(album.items(), album_gain.track_gains):
|
||||||
album_gain.track_gains):
|
|
||||||
self.store_track_gain(item, track_gain)
|
self.store_track_gain(item, track_gain)
|
||||||
if write:
|
if write:
|
||||||
item.try_write()
|
item.try_write()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue