mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
pep8
This commit is contained in:
parent
b0d18ffb41
commit
081f4989b7
@ -1,5 +1,6 @@
|
|||||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||||
|
|
||||||
|
|
||||||
def _optimize(tagList, tagName, conversion):
|
def _optimize(tagList, tagName, conversion):
|
||||||
# copy the tag of interest plus any text
|
# copy the tag of interest plus any text
|
||||||
newTagList = []
|
newTagList = []
|
||||||
|
@ -393,7 +393,8 @@ def test_normalization(return_tests=False): # {{{
|
|||||||
tuple('0 0 0 0'.split()) : '0',
|
tuple('0 0 0 0'.split()) : '0',
|
||||||
}):
|
}):
|
||||||
for prefix in ('margin', 'padding'):
|
for prefix in ('margin', 'padding'):
|
||||||
css = {'%s-%s' % (prefix, x) : unicode_type(y)+'pt' if isinstance(y, numbers.Number) else y for x, y in zip(('left', 'top', 'right', 'bottom'), s)}
|
css = {'%s-%s' % (prefix, x) : unicode_type(y)+'pt' if isinstance(y, numbers.Number) else y
|
||||||
|
for x, y in zip(('left', 'top', 'right', 'bottom'), s)}
|
||||||
css = '; '.join(('%s:%s' % (k, v) for k, v in iteritems(css)))
|
css = '; '.join(('%s:%s' % (k, v) for k, v in iteritems(css)))
|
||||||
style = parseStyle(css)
|
style = parseStyle(css)
|
||||||
condense_rule(style)
|
condense_rule(style)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user