Skip to content

Commit 5d7bd1b

Browse files
committed
font-patcher: Comment on maybe strange looking code
[why] I again had to look the reason for the code up, which just looks strange. Who expects that a bool is an instance of int? I certainly not. Signed-off-by: Fini Jastrow <[email protected]>
1 parent 825b526 commit 5d7bd1b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

font-patcher

+1
Original file line numberDiff line numberDiff line change
@@ -2168,6 +2168,7 @@ def setup_arguments():
21682168
logger.critical("Can not create single font files from True Type Collections")
21692169
sys.exit(1)
21702170

2171+
# The if might look ridiculous, but isinstance(False, int) is True!
21712172
if isinstance(args.xavgwidth, int) and not isinstance(args.xavgwidth, bool):
21722173
if args.xavgwidth < 0:
21732174
logger.critical("--xavgcharwidth takes no negative numbers")

0 commit comments

Comments
 (0)