1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-20 21:21:35 +02:00

Removed iteritems and itervalues, which are redundant

This commit is contained in:
2020-04-21 18:20:08 +02:00
parent 9e076e0af4
commit 3234e4de27
82 changed files with 382 additions and 457 deletions
+2 -3
View File
@@ -1,5 +1,4 @@
import textwrap
from ebook_converter.polyglot.builtins import iteritems
# from lxml.etree import Element
@@ -219,7 +218,7 @@ def pretty_xml(container, name, raw):
def fix_all_html(container):
' Fix any parsing errors in all HTML files in the container. Fixing is done using the HTML5 parsing algorithm. '
for name, mt in iteritems(container.mime_map):
for name, mt in container.mime_map.items():
if mt in OEB_DOCS:
container.parsed(name)
container.dirty(name)
@@ -228,7 +227,7 @@ def fix_all_html(container):
def pretty_all(container):
' Pretty print all HTML/CSS/XML files in the container '
xml_types = {guess_type('a.ncx'), guess_type('a.xml'), guess_type('a.svg')}
for name, mt in iteritems(container.mime_map):
for name, mt in container.mime_map.items():
prettied = False
if mt in OEB_DOCS:
pretty_html_tree(container, container.parsed(name))