1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-04-20 13:11:27 +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
@@ -9,7 +9,6 @@ import codecs
import os
from .pylrfopt import tagListOptimizer
from ebook_converter.polyglot.builtins import iteritems
PYLRF_VERSION = "1.0"
@@ -525,7 +524,7 @@ class LrfObject(object):
# belongs somewhere, so here it is.
#
composites = {}
for name, value in iteritems(tagDict):
for name, value in tagDict.items():
if name == 'rubyAlignAndAdjust':
continue
if name in {
+2 -2
View File
@@ -51,7 +51,7 @@ DEFAULT_GENREADING = "fs" # default is yes to both lrf and lrs
from ebook_converter import __appname__, __version__
from ebook_converter import entity_to_unicode
from ebook_converter.polyglot.builtins import iteritems, native_string_type
from ebook_converter.polyglot.builtins import native_string_type
class LrsError(Exception):
@@ -1835,7 +1835,7 @@ class Span(LrsSimpleChar1, LrsContainer):
oldTextStyle = self.findCurrentTextStyle()
# set the attributes we want changed
for (name, value) in tuple(iteritems(self.attrs)):
for name, value in tuple(self.attrs.items()):
if name in oldTextStyle.attrs and oldTextStyle.attrs[name] == self.attrs[name]:
self.attrs.pop(name)
else: