Rename 'throwaway' variables to single underscore

Also removed unused ones
This commit is contained in:
JoeLametta
2019-01-17 09:57:12 +00:00
parent 16b0d8dc29
commit e7bfc34c0e
14 changed files with 14 additions and 18 deletions

View File

@@ -192,7 +192,7 @@ class ImageEncodeTask(task.MultiSeparateTask):
path = image.getRealPath(index.path)
assert isinstance(path, unicode), "%r is not unicode" % path
logger.debug('schedule encode of %r', path)
root, ext = os.path.splitext(os.path.basename(path))
root, _ = os.path.splitext(os.path.basename(path))
outpath = os.path.join(outdir, root + '.' + 'flac')
logger.debug('schedule encode to %r', outpath)
taskk = encode.FlacEncodeTask(

View File

@@ -117,7 +117,7 @@ class Sources:
"""
Retrieve the source used at the given offset.
"""
for i, (c, o, s) in enumerate(self._sources):
for i, (_, o, _) in enumerate(self._sources):
if offset < o:
return self._sources[i - 1]
@@ -127,7 +127,7 @@ class Sources:
"""
Retrieve the absolute offset of the first source for this counter
"""
for i, (c, o, s) in enumerate(self._sources):
for i, (c, _, _) in enumerate(self._sources):
if c == counter:
return self._sources[i][1]
@@ -151,7 +151,7 @@ class TocFile(object):
def _index(self, currentTrack, i, absoluteOffset, trackOffset):
absolute = absoluteOffset + trackOffset
# this may be in a new source, so calculate relative
c, o, s = self._sources.get(absolute)
c, _, s = self._sources.get(absolute)
logger.debug('at abs offset %d, we are in source %r',
absolute, s)
counterStart = self._sources.getCounterStart(c)
@@ -341,7 +341,7 @@ class TocFile(object):
continue
length = common.msfToFrames(m.group('length'))
c, o, s = self._sources.get(absoluteOffset)
c, _, s = self._sources.get(absoluteOffset)
logger.debug('at abs offset %d, we are in source %r',
absoluteOffset, s)
counterStart = self._sources.getCounterStart(c)