mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
pep8
This commit is contained in:
parent
db6d0dd2cb
commit
4777eeacef
@ -29,6 +29,7 @@ real_nibbles = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
|||||||
'.', 'E', 'E-', None, '-']
|
'.', 'E', 'E-', None, '-']
|
||||||
real_nibbles_map = {x:i for i, x in enumerate(real_nibbles)}
|
real_nibbles_map = {x:i for i, x in enumerate(real_nibbles)}
|
||||||
|
|
||||||
|
|
||||||
class ByteCode(dict):
|
class ByteCode(dict):
|
||||||
|
|
||||||
def read_byte(self, b0, data, index):
|
def read_byte(self, b0, data, index):
|
||||||
@ -119,6 +120,7 @@ class ByteCode(dict):
|
|||||||
f = self.write_float if isinstance(value, float) else self.write_int
|
f = self.write_float if isinstance(value, float) else self.write_int
|
||||||
return f(value, encoding)
|
return f(value, encoding)
|
||||||
|
|
||||||
|
|
||||||
class Dict(ByteCode):
|
class Dict(ByteCode):
|
||||||
|
|
||||||
operand_encoding = cff_dict_operand_encoding
|
operand_encoding = cff_dict_operand_encoding
|
||||||
@ -235,6 +237,7 @@ class Dict(ByteCode):
|
|||||||
last = v
|
last = v
|
||||||
return self.encode_array(out)
|
return self.encode_array(out)
|
||||||
|
|
||||||
|
|
||||||
class TopDict(Dict):
|
class TopDict(Dict):
|
||||||
|
|
||||||
TABLE = (
|
TABLE = (
|
||||||
@ -281,6 +284,7 @@ class TopDict(Dict):
|
|||||||
'UIDBase', 'Encoding', 'FDSelect', 'FDArray'}
|
'UIDBase', 'Encoding', 'FDSelect', 'FDArray'}
|
||||||
OFFSETS = {'charset', 'Encoding', 'CharStrings', 'Private'}
|
OFFSETS = {'charset', 'Encoding', 'CharStrings', 'Private'}
|
||||||
|
|
||||||
|
|
||||||
class PrivateDict(Dict):
|
class PrivateDict(Dict):
|
||||||
|
|
||||||
TABLE = (
|
TABLE = (
|
||||||
@ -308,4 +312,3 @@ class PrivateDict(Dict):
|
|||||||
)
|
)
|
||||||
|
|
||||||
OFFSETS = {'Subrs'}
|
OFFSETS = {'Subrs'}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user