Merge pull request #1928 from simoncozens/unused-loop-variable

Use _ to denoted unused loop variable
This commit is contained in:
Cosimo Lupo 2020-05-11 11:10:57 +01:00 committed by GitHub
commit 07e3cf7ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -974,7 +974,7 @@ class Merger(object):
self._preMerge(font) self._preMerge(font)
self.fonts = fonts self.fonts = fonts
self.duplicateGlyphsPerFont = [{} for f in fonts] self.duplicateGlyphsPerFont = [{} for _ in fonts]
allTags = reduce(set.union, (list(font.keys()) for font in fonts), set()) allTags = reduce(set.union, (list(font.keys()) for font in fonts), set())
allTags.remove('GlyphOrder') allTags.remove('GlyphOrder')

View File

@ -154,7 +154,7 @@ class table_E_B_L_C_(DefaultTable.DefaultTable):
# (2) Build each bitmapSizeTable. # (2) Build each bitmapSizeTable.
# (3) Consolidate all the data into the main dataList in the correct order. # (3) Consolidate all the data into the main dataList in the correct order.
for curStrike in self.strikes: for _ in self.strikes:
dataSize += sstruct.calcsize(bitmapSizeTableFormatPart1) dataSize += sstruct.calcsize(bitmapSizeTableFormatPart1)
dataSize += len(('hori', 'vert')) * sstruct.calcsize(sbitLineMetricsFormat) dataSize += len(('hori', 'vert')) * sstruct.calcsize(sbitLineMetricsFormat)
dataSize += sstruct.calcsize(bitmapSizeTableFormatPart2) dataSize += sstruct.calcsize(bitmapSizeTableFormatPart2)

View File

@ -154,7 +154,7 @@ def _SinglePosUpgradeToFormat2(self):
ret.Format = 2 ret.Format = 2
ret.Coverage = self.Coverage ret.Coverage = self.Coverage
ret.ValueFormat = self.ValueFormat ret.ValueFormat = self.ValueFormat
ret.Value = [self.Value for g in ret.Coverage.glyphs] ret.Value = [self.Value for _ in ret.Coverage.glyphs]
ret.ValueCount = len(ret.Value) ret.ValueCount = len(ret.Value)
return ret return ret
@ -260,7 +260,7 @@ def merge(merger, self, lst):
[v.Value for v in lst]) [v.Value for v in lst])
self.Coverage.glyphs = glyphs self.Coverage.glyphs = glyphs
self.Value = [otBase.ValueRecord(valueFormat) for g in glyphs] self.Value = [otBase.ValueRecord(valueFormat) for _ in glyphs]
self.ValueCount = len(self.Value) self.ValueCount = len(self.Value)
for i,values in enumerate(padded): for i,values in enumerate(padded):
@ -339,7 +339,7 @@ def _PairPosFormat1_merge(self, lst, merger):
default=empty) default=empty)
self.Coverage.glyphs = glyphs self.Coverage.glyphs = glyphs
self.PairSet = [ot.PairSet() for g in glyphs] self.PairSet = [ot.PairSet() for _ in glyphs]
self.PairSetCount = len(self.PairSet) self.PairSetCount = len(self.PairSet)
for glyph, ps in zip(glyphs, self.PairSet): for glyph, ps in zip(glyphs, self.PairSet):
ps._firstGlyph = glyph ps._firstGlyph = glyph