py2to3 automatic conversion. Woot!

This commit is contained in:
Ryan Holmes
2017-06-12 16:12:45 -04:00
parent ad535ccc78
commit 828b18d0fd
147 changed files with 1017 additions and 783 deletions

View File

@@ -171,7 +171,7 @@ class Miscellanea(ViewColumn):
"falloff range": falloffRangeBonus,
"tracking speed": trackingSpeedBonus}
isTrackingDisruptor = any(map(lambda x: x is not None and x != 0, trackingDisruptorAttributes.values()))
isTrackingDisruptor = any([x is not None and x != 0 for x in list(trackingDisruptorAttributes.values())])
# Then get the attributes for guidance disruptors
explosionVelocityBonus = stuff.getModifiedItemAttr("aoeVelocityBonus")
@@ -186,7 +186,7 @@ class Miscellanea(ViewColumn):
"flight time": flightTimeBonus,
"missile velocity": missileVelocityBonus}
isGuidanceDisruptor = any(map(lambda x: x is not None and x != 0, guidanceDisruptorAttributes.values()))
isGuidanceDisruptor = any([x is not None and x != 0 for x in list(guidanceDisruptorAttributes.values())])
if isTrackingDisruptor:
attributes = trackingDisruptorAttributes
@@ -195,12 +195,12 @@ class Miscellanea(ViewColumn):
else:
return "", None
display = max(attributes.values(), key=lambda x: abs(x))
display = max(list(attributes.values()), key=lambda x: abs(x))
text = "{0}%".format(formatAmount(display, 3, 0, 3, forceSign=True))
ttEntries = []
for attributeName, attributeValue in attributes.items():
for attributeName, attributeValue in list(attributes.items()):
if attributeValue == display:
ttEntries.append(attributeName)