[FIX] _extensions: p3 compatibility (5)

This commit is contained in:
Olivier Dony 2018-05-30 12:09:58 +02:00
parent 1dcc9b8b0a
commit 813590727d
2 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ class Fields(Directive):
)) ))
) )
) )
for k, v in fields.iteritems() for k, v in fields.items()
# if there's a whitelist, only display whitelisted fields # if there's a whitelist, only display whitelisted fields
if not whitelist or k in whitelist if not whitelist or k in whitelist
# only display if there's a help text # only display if there's a help text

View File

@ -71,9 +71,9 @@ class BootstrapTranslator(nodes.NodeVisitor, object):
tagname = unicode(tagname).lower() tagname = unicode(tagname).lower()
# extract generic attributes # extract generic attributes
attrs = {name.lower(): value for name, value in attributes.iteritems()} attrs = {name.lower(): value for name, value in attributes.items()}
attrs.update( attrs.update(
(name, value) for name, value in node.attributes.iteritems() (name, value) for name, value in node.attributes.items()
if name.startswith('data-') if name.startswith('data-')
) )
@ -97,7 +97,7 @@ class BootstrapTranslator(nodes.NodeVisitor, object):
prefix=u''.join(prefix), prefix=u''.join(prefix),
tag=tagname, tag=tagname,
attrs=u' '.join(u'{}="{}"'.format(name, self.attval(value)) attrs=u' '.join(u'{}="{}"'.format(name, self.attval(value))
for name, value in attrs.iteritems()), for name, value in attrs.items()),
postfix=u''.join(postfix), postfix=u''.join(postfix),
) )
# only "space characters" SPACE, CHARACTER TABULATION, LINE FEED, # only "space characters" SPACE, CHARACTER TABULATION, LINE FEED,