summaryrefslogtreecommitdiff
blob: 4e7b1502ce8a5eeeb730d456392065baa45208c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
--- Lib/fontTools/ttLib/tables/_c_m_a_p.py
+++ Lib/fontTools/ttLib/tables/_c_m_a_p.py
@@ -174,7 +174,7 @@
 		if data != None and ttFont != None:
 			self.decompileHeader(data[offset:offset+int(length)], ttFont)
 		else:
-			assert(	(data == None and (ttFont == None), "Need both data and ttFont arguments"))
+			assert (data == None and ttFont == None), "Need both data and ttFont arguments"
 		data = self.data # decompileHeader assigns the data after the header to self.data
 		assert 262 == self.length, "Format 0 cmap subtable not 262 bytes"
 		glyphIdArray = array.array("B")
@@ -262,7 +262,7 @@
 		if data != None and ttFont != None:
 			self.decompileHeader(data[offset:offset+int(length)], ttFont)
 		else:
-			assert(	(data == None and (ttFont == None), "Need both data and ttFont arguments"))
+			assert (data == None and ttFont == None), "Need both data and ttFont arguments"
 
 		data = self.data # decompileHeader assigns the data after the header to self.data
 		subHeaderKeys = []
@@ -632,7 +632,7 @@
 		if data != None and ttFont != None:
 			self.decompileHeader(self.data[offset:offset+int(length)], ttFont)
 		else:
-			assert(	(data == None and (ttFont == None), "Need both data and ttFont arguments"))
+			assert (data == None and ttFont == None), "Need both data and ttFont arguments"
 
 		data = self.data # decompileHeader assigns the data after the header to self.data
 		(segCountX2, searchRange, entrySelector, rangeShift) = \
@@ -836,7 +836,7 @@
 		if data != None and ttFont != None:
 			self.decompileHeader(data[offset:offset+int(length)], ttFont)
 		else:
-			assert(	(data == None and (ttFont == None), "Need both data and ttFont arguments"))
+			assert (data == None and ttFont == None), "Need both data and ttFont arguments"
 
 		data = self.data # decompileHeader assigns the data after the header to self.data
 		firstCode, entryCount = struct.unpack(">HH", data[:4])
@@ -924,7 +924,7 @@
 		if data != None and ttFont != None:
 			self.decompileHeader(data[offset:offset+int(length)], ttFont)
 		else:
-			assert(	(data == None and (ttFont == None), "Need both data and ttFont arguments"))
+			assert (data == None and ttFont == None), "Need both data and ttFont arguments"
 
 		data = self.data # decompileHeader assigns the data after the header to self.data
 		charCodes = []
@@ -1086,7 +1086,7 @@
 		if data != None and ttFont != None:
 			self.decompileHeader(data, ttFont)
 		else:
-			assert(	(data == None and (ttFont == None), "Need both data and ttFont arguments"))
+			assert (data == None and ttFont == None), "Need both data and ttFont arguments"
 		data = self.data
 		
 		self.cmap = {} # so that clients that expect this to exist in a cmap table won't fail.
@@ -1277,7 +1277,7 @@
 		if data != None and ttFont != None:
 			self.decompileHeader(data[offset:offset+int(length)], ttFont)
 		else:
-			assert(	(data == None and (ttFont == None), "Need both data and ttFont arguments"))
+			assert (data == None and ttFont == None), "Need both data and ttFont arguments"
 
 	def compile(self, ttFont):
 		if self.data:
--- Lib/fontTools/ttLib/tables/ttProgram.py
+++ Lib/fontTools/ttLib/tables/ttProgram.py
@@ -394,7 +394,7 @@
 	
 	p = Program()
 	p.fromBytecode(bc)
-	as = p.getAssembly()
-	p.fromAssembly(as)
+	assembly = p.getAssembly()
+	p.fromAssembly(assembly)
 	print bc == p.getBytecode()