mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Micro-optimization
This commit is contained in:
parent
a496b95840
commit
ec8780bdff
@ -2669,7 +2669,7 @@ def getPhases(debug):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def adjust_attributes(token, replacements):
|
def adjust_attributes(token, replacements):
|
||||||
if frozenset(token['data']) & frozenset(replacements):
|
if token['data'].viewkeys() & replacements.viewkeys():
|
||||||
token['data'] = OrderedDict(
|
token['data'] = OrderedDict(
|
||||||
(replacements.get(k, k), v) for k, v in token['data'].iteritems())
|
(replacements.get(k, k), v) for k, v in token['data'].iteritems())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user