1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-22 06:01:32 +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
+1 -2
View File
@@ -3,7 +3,6 @@ from operator import itemgetter
from lxml import etree
from ebook_converter.utils.icu import partition_by_first_letter, sort_key
from ebook_converter.polyglot.builtins import iteritems
__license__ = 'GPL v3'
@@ -99,7 +98,7 @@ def process_index(field, index, xe_fields, log, XPath, expand):
if heading_text is not None:
groups = partition_by_first_letter(xe_fields, key=itemgetter('text'))
items = []
for key, fields in iteritems(groups):
for key, fields in groups.items():
items.append(key), items.extend(fields)
if styles:
heading_style = styles[0]