Skip to content

Commit

Permalink
Use set comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
madig committed Oct 7, 2021
1 parent 31c3409 commit e2b788c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/fontTools/ufoLib/glifLib.py
Expand Up @@ -457,7 +457,9 @@ def writeGlyph(self, glyphName, glyphObject=None, drawPointsFunc=None, formatVer
fileName = self.contents.get(glyphName)
if fileName is None:
if self._existingFileNames is None:
self._existingFileNames = set(fileName.lower() for fileName in self.contents.values())
self._existingFileNames = {
fileName.lower() for fileName in self.contents.values()
}
fileName = self.glyphNameToFileName(glyphName, self._existingFileNames)
self.contents[glyphName] = fileName
self._existingFileNames.add(fileName.lower())
Expand Down

0 comments on commit e2b788c

Please sign in to comment.