Skip to content

Commit e3eb77c

Browse files
authored
Merge pull request #29 from jenskutilek/code-style-black
Format code with "black"
2 parents 7b0c6ad + 458deba commit e3eb77c

File tree

8 files changed

+270
-52
lines changed

8 files changed

+270
-52
lines changed

Lib/extractor/__init__.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
Type1=extractFontFromType1,
1313
WOFF=extractFontFromWOFF,
1414
ttx=extractFontFromTTX,
15-
vfb=extractFontFromVFB
15+
vfb=extractFontFromVFB,
1616
)
1717

18+
1819
def extractFormat(pathOrFile):
1920
if isType1(pathOrFile):
2021
return "Type1"
@@ -28,7 +29,16 @@ def extractFormat(pathOrFile):
2829
return "vfb"
2930
return None
3031

31-
def extractUFO(pathOrFile, destination, doGlyphs=True, doInfo=True, doKerning=True, format=None, customFunctions={}):
32+
33+
def extractUFO(
34+
pathOrFile,
35+
destination,
36+
doGlyphs=True,
37+
doInfo=True,
38+
doKerning=True,
39+
format=None,
40+
customFunctions={},
41+
):
3242
if format is None:
3343
format = extractFormat(pathOrFile)
3444
if format not in _extractFunctions:
@@ -40,9 +50,19 @@ def extractUFO(pathOrFile, destination, doGlyphs=True, doInfo=True, doKerning=Tr
4050
# occurs, print the traceback for debugging and
4151
# raise an ExtractorError.
4252
try:
43-
func(pathOrFile, destination, doGlyphs=doGlyphs, doInfo=doInfo, doKerning=doKerning, customFunctions=customFunctions.get(format, []))
53+
func(
54+
pathOrFile,
55+
destination,
56+
doGlyphs=doGlyphs,
57+
doInfo=doInfo,
58+
doKerning=doKerning,
59+
customFunctions=customFunctions.get(format, []),
60+
)
4461
except:
4562
import sys
4663
import traceback
64+
4765
traceback.print_exc(file=sys.stdout)
48-
raise ExtractorError("There was an error reading the %s file." % format)
66+
raise ExtractorError(
67+
"There was an error reading the %s file." % format
68+
)

Lib/extractor/exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
class ExtractorError(Exception): pass
1+
class ExtractorError(Exception):
2+
pass

0 commit comments

Comments
 (0)