Skip to content

Commit

Permalink
Merge pull request #1928 from simoncozens/unused-loop-variable
Browse files Browse the repository at this point in the history
Use _ to denoted unused loop variable
  • Loading branch information
anthrotype committed May 11, 2020
2 parents 798608b + 46c8f90 commit 07e3cf7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lib/fontTools/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ def merge(self, fontfiles):
self._preMerge(font)

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.remove('GlyphOrder')
Expand Down
2 changes: 1 addition & 1 deletion Lib/fontTools/ttLib/tables/E_B_L_C_.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def compile(self, ttFont):
# (2) Build each bitmapSizeTable.
# (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 += len(('hori', 'vert')) * sstruct.calcsize(sbitLineMetricsFormat)
dataSize += sstruct.calcsize(bitmapSizeTableFormatPart2)
Expand Down
6 changes: 3 additions & 3 deletions Lib/fontTools/varLib/merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _SinglePosUpgradeToFormat2(self):
ret.Format = 2
ret.Coverage = self.Coverage
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)

return ret
Expand Down Expand Up @@ -260,7 +260,7 @@ def merge(merger, self, lst):
[v.Value for v in lst])

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)

for i,values in enumerate(padded):
Expand Down Expand Up @@ -339,7 +339,7 @@ def _PairPosFormat1_merge(self, lst, merger):
default=empty)

self.Coverage.glyphs = glyphs
self.PairSet = [ot.PairSet() for g in glyphs]
self.PairSet = [ot.PairSet() for _ in glyphs]
self.PairSetCount = len(self.PairSet)
for glyph, ps in zip(glyphs, self.PairSet):
ps._firstGlyph = glyph
Expand Down

0 comments on commit 07e3cf7

Please sign in to comment.