bajillion pep8 fixes to pass tox

This commit is contained in:
Ebag333
2016-12-13 23:31:39 -08:00
parent be53dedb18
commit 28404cd8bb
206 changed files with 3128 additions and 2391 deletions

View File

@@ -22,9 +22,12 @@ import gui.mainFrame
from gui.statsView import StatsView
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
from service.fit import Fit
class FirepowerViewFull(StatsView):
name = "firepowerViewFull"
def __init__(self, parent):
StatsView.__init__(self)
self.parent = parent
@@ -34,7 +37,7 @@ class FirepowerViewFull(StatsView):
return "Firepower"
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent( text )
width, height = self.parent.GetTextExtent(text)
return width
def populatePanel(self, contentPanel, headerPanel):
@@ -83,7 +86,7 @@ class FirepowerViewFull(StatsView):
baseBox.Add(BitmapLoader.getStaticBitmap("volley_big", parent, "gui"), 0, wx.ALIGN_CENTER)
gridS = wx.GridSizer(2,2,0,0)
gridS = wx.GridSizer(2, 2, 0, 0)
baseBox.Add(gridS, 0)
@@ -138,20 +141,20 @@ class FirepowerViewFull(StatsView):
view.refreshPanel(fit)
def refreshPanel(self, fit):
#If we did anything intresting, we'd update our labels to reflect the new fit's stats here
# If we did anything intresting, we'd update our labels to reflect the new fit's stats here
if fit is not None and fit.targetResists is not None:
self.stEff.Show()
else:
self.stEff.Hide()
stats = (("labelFullDpsWeapon", lambda: fit.weaponDPS, 3, 0, 0, "%s DPS",None),
stats = (("labelFullDpsWeapon", lambda: fit.weaponDPS, 3, 0, 0, "%s DPS", None),
("labelFullDpsDrone", lambda: fit.droneDPS, 3, 0, 0, "%s DPS", None),
("labelFullVolleyTotal", lambda: fit.totalVolley, 3, 0, 0, "%s", "Volley: %.1f"),
("labelFullDpsTotal", lambda: fit.totalDPS, 3, 0, 0, "%s", None))
# See GH issue #
#if fit is not None and fit.totalYield > 0:
# if fit is not None and fit.totalYield > 0:
# self.miningyield.Show()
#else:
# else:
# self.miningyield.Hide()
counter = 0
@@ -165,7 +168,7 @@ class FirepowerViewFull(StatsView):
tipStr = valueFormat % valueStr if altFormat is None else altFormat % value
label.SetToolTip(wx.ToolTip(tipStr))
self._cachedValues[counter] = value
counter +=1
counter += 1
self.panel.Layout()
self.headerPanel.Layout()

View File

@@ -22,18 +22,22 @@ import gui.mainFrame
from gui.statsView import StatsView
from gui.bitmapLoader import BitmapLoader
from gui.utils.numberFormatter import formatAmount
from service.fit import Fit
class MiningYieldViewFull(StatsView):
name = "miningyieldViewFull"
def __init__(self, parent):
StatsView.__init__(self)
self.parent = parent
self._cachedValues = []
def getHeaderText(self, fit):
return "Mining Yield"
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent( text )
width, height = self.parent.GetTextExtent(text)
return width
def populatePanel(self, contentPanel, headerPanel):
@@ -46,11 +50,11 @@ class MiningYieldViewFull(StatsView):
sizerMiningYield = wx.FlexGridSizer(1, 4)
sizerMiningYield.AddGrowableCol(1)
contentSizer.Add( sizerMiningYield, 0, wx.EXPAND, 0)
contentSizer.Add(sizerMiningYield, 0, wx.EXPAND, 0)
counter = 0
for miningType, image in (("miner", "mining") , ("drone", "drones")):
for miningType, image in (("miner", "mining"), ("drone", "drones")):
baseBox = wx.BoxSizer(wx.HORIZONTAL)
sizerMiningYield.Add(baseBox, 1, wx.ALIGN_LEFT if counter == 0 else wx.ALIGN_CENTER_HORIZONTAL)
@@ -65,7 +69,7 @@ class MiningYieldViewFull(StatsView):
box.Add(hbox, 1, wx.ALIGN_CENTER)
lbl = wx.StaticText(parent, wx.ID_ANY, u"0.0 m\u00B3/s")
setattr(self, "label%sminingyield%s" % (panel.capitalize() ,miningType.capitalize()), lbl)
setattr(self, "label%sminingyield%s" % (panel.capitalize(), miningType.capitalize()), lbl)
hbox.Add(lbl, 0, wx.ALIGN_CENTER)
self._cachedValues.append(0)
@@ -121,9 +125,9 @@ class MiningYieldViewFull(StatsView):
view.refreshPanel(fit)
def refreshPanel(self, fit):
#If we did anything intresting, we'd update our labels to reflect the new fit's stats here
# If we did anything intresting, we'd update our labels to reflect the new fit's stats here
stats = (("labelFullminingyieldMiner", lambda: fit.minerYield, 3, 0, 0, u"%s m\u00B3/s",None),
stats = (("labelFullminingyieldMiner", lambda: fit.minerYield, 3, 0, 0, u"%s m\u00B3/s", None),
("labelFullminingyieldDrone", lambda: fit.droneYield, 3, 0, 0, u"%s m\u00B3/s", None),
("labelFullminingyieldTotal", lambda: fit.totalYield, 3, 0, 0, u"%s m\u00B3/s", None))
@@ -138,7 +142,7 @@ class MiningYieldViewFull(StatsView):
tipStr = valueFormat % valueStr if altFormat is None else altFormat % value
label.SetToolTip(wx.ToolTip(tipStr))
self._cachedValues[counter] = value
counter +=1
counter += 1
self.panel.Layout()
self.headerPanel.Layout()

View File

@@ -62,7 +62,8 @@ class RechargeViewFull(StatsView):
# Add an empty label first for correct alignment.
sizerTankStats.Add(wx.StaticText(contentPanel, wx.ID_ANY, ""), 0)
toolTipText = {"shieldPassive": "Passive shield recharge", "shieldActive": "Active shield boost", "armorActive": "Armor repair amount", "hullActive": "Hull repair amount"}
toolTipText = {"shieldPassive": "Passive shield recharge", "shieldActive": "Active shield boost",
"armorActive": "Armor repair amount", "hullActive": "Hull repair amount"}
for tankType in ("shieldPassive", "shieldActive", "armorActive", "hullActive"):
bitmap = BitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[tankType])

View File

@@ -19,18 +19,18 @@
import wx
from gui.statsView import StatsView
from gui import builtinStatsViews
from gui.bitmapLoader import BitmapLoader
from gui import pygauge as PG
from gui.utils.numberFormatter import formatAmount
import gui.mainFrame
import gui.builtinViews.fittingView as fv
import gui.globalEvents as GE
EffectiveHpToggled, EFFECTIVE_HP_TOGGLED = wx.lib.newevent.NewEvent()
class ResistancesViewFull(StatsView):
name = "resistancesViewFull"
def __init__(self, parent):
StatsView.__init__(self)
self.parent = parent
@@ -44,7 +44,7 @@ class ResistancesViewFull(StatsView):
return "Resistances"
def getTextExtentW(self, text):
width, height = self.parent.GetTextExtent( text )
width, height = self.parent.GetTextExtent(text)
return width
def populatePanel(self, contentPanel, headerPanel):
@@ -55,7 +55,7 @@ class ResistancesViewFull(StatsView):
# Custom header EHP
headerContentSizer = wx.BoxSizer(wx.HORIZONTAL)
hsizer = headerPanel.GetSizer()
hsizer.Add(headerContentSizer,0,0,0)
hsizer.Add(headerContentSizer, 0, 0, 0)
self.stEff = wx.StaticText(headerPanel, wx.ID_ANY, "( Effective HP: ")
headerContentSizer.Add(self.stEff)
headerPanel.GetParent().AddToggleItem(self.stEff)
@@ -66,81 +66,83 @@ class ResistancesViewFull(StatsView):
stCls = wx.StaticText(headerPanel, wx.ID_ANY, " )")
headerPanel.GetParent().AddToggleItem( stCls )
headerContentSizer.Add( stCls )
# headerContentSizer.Add(wx.StaticLine(headerPanel, wx.ID_ANY), 1, wx.ALIGN_CENTER)
headerPanel.GetParent().AddToggleItem(stCls)
headerContentSizer.Add(stCls)
# headerContentSizer.Add(wx.StaticLine(headerPanel, wx.ID_ANY), 1, wx.ALIGN_CENTER)
# Display table
col = 0
row = 0
sizerResistances = wx.GridBagSizer()
contentSizer.Add( sizerResistances, 0, wx.EXPAND , 0)
contentSizer.Add(sizerResistances, 0, wx.EXPAND, 0)
# Add an empty label, then the rest.
sizerResistances.Add(wx.StaticText(contentPanel, wx.ID_ANY), wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ))
col+=1
toolTipText = {"em" : "Electromagnetic resistance", "thermal" : "Thermal resistance", "kinetic" : "Kinetic resistance", "explosive" : "Explosive resistance"}
sizerResistances.Add(wx.StaticText(contentPanel, wx.ID_ANY), wx.GBPosition(row, col), wx.GBSpan(1, 1))
col += 1
toolTipText = {"em": "Electromagnetic resistance", "thermal": "Thermal resistance",
"kinetic": "Kinetic resistance", "explosive": "Explosive resistance"}
for damageType in ("em", "thermal", "kinetic", "explosive"):
bitmap = BitmapLoader.getStaticBitmap("%s_big" % damageType, contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[damageType])
bitmap.SetToolTip(tooltip)
sizerResistances.Add(bitmap, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
col+=1
self.stEHPs = wx.Button(contentPanel, style = wx.BU_EXACTFIT, label = "EHP")
sizerResistances.Add(bitmap, wx.GBPosition(row, col), wx.GBSpan(1, 1), wx.ALIGN_CENTER)
col += 1
self.stEHPs = wx.Button(contentPanel, style=wx.BU_EXACTFIT, label="EHP")
self.stEHPs.SetToolTip(wx.ToolTip("Click to toggle between effective HP and raw HP"))
self.stEHPs.Bind(wx.EVT_BUTTON, self.toggleEHP)
for i in xrange(4):
sizerResistances.AddGrowableCol(i+1)
sizerResistances.AddGrowableCol(i + 1)
sizerResistances.Add(self.stEHPs, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
col=0
row+=1
sizerResistances.Add(self.stEHPs, wx.GBPosition(row, col), wx.GBSpan(1, 1), wx.ALIGN_CENTER)
col = 0
row += 1
gaugeColours=( ((38,133,198),(52,86,98)), ((198,38,38),(83,65,67)), ((163,163,163),(74,90,93)), ((198,133,38),(81,83,67)) )
gaugeColours = (((38, 133, 198), (52, 86, 98)), ((198, 38, 38), (83, 65, 67)), ((163, 163, 163), (74, 90, 93)),
((198, 133, 38), (81, 83, 67)))
toolTipText = {"shield" : "Shield resistance", "armor" : "Armor resistance", "hull" : "Hull resistance", "damagePattern" : "Incoming damage pattern"}
toolTipText = {"shield": "Shield resistance", "armor": "Armor resistance", "hull": "Hull resistance",
"damagePattern": "Incoming damage pattern"}
for tankType in ("shield", "armor", "hull", "separator", "damagePattern"):
if tankType != "separator":
bitmap = BitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "gui")
tooltip = wx.ToolTip(toolTipText[tankType])
bitmap.SetToolTip(tooltip)
sizerResistances.Add(bitmap, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
col+=1
sizerResistances.Add(bitmap, wx.GBPosition(row, col), wx.GBSpan(1, 1), wx.ALIGN_CENTER)
col += 1
else:
sizerResistances.Add(wx.StaticLine(contentPanel, wx.ID_ANY), wx.GBPosition( row, col ), wx.GBSpan( 1, 6 ), wx.EXPAND|wx.ALIGN_CENTER)
row+=1
col=0
sizerResistances.Add(wx.StaticLine(contentPanel, wx.ID_ANY), wx.GBPosition(row, col), wx.GBSpan(1, 6),
wx.EXPAND | wx.ALIGN_CENTER)
row += 1
col = 0
continue
currGColour=0
currGColour = 0
for damageType in ("em", "thermal", "kinetic", "explosive"):
box = wx.BoxSizer(wx.HORIZONTAL)
sizerResistances.Add(box, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
sizerResistances.Add(box, wx.GBPosition(row, col), wx.GBSpan(1, 1), wx.ALIGN_CENTER)
# Fancy gauges addon
#Fancy gauges addon
pgColour= gaugeColours[currGColour]
pgColour = gaugeColours[currGColour]
fc = pgColour[0]
bc = pgColour[1]
currGColour+=1
currGColour += 1
lbl = PG.PyGauge(contentPanel, wx.ID_ANY, 100)
lbl.SetMinSize((48, 16))
lbl.SetBackgroundColour(wx.Colour(bc[0],bc[1],bc[2]))
lbl.SetBarColour(wx.Colour(fc[0],fc[1],fc[2]))
lbl.SetBackgroundColour(wx.Colour(bc[0], bc[1], bc[2]))
lbl.SetBarColour(wx.Colour(fc[0], fc[1], fc[2]))
lbl.SetBarGradient()
lbl.SetFractionDigits(1)
setattr(self, "gaugeResistance%s%s" % (tankType.capitalize(), damageType.capitalize()), lbl)
box.Add(lbl, 0, wx.ALIGN_CENTER)
col+=1
col += 1
box = wx.BoxSizer(wx.VERTICAL)
box.SetMinSize(wx.Size(self.getTextExtentW("WWWWk"), -1))
@@ -148,9 +150,9 @@ class ResistancesViewFull(StatsView):
box.Add(lbl, 0, wx.ALIGN_CENTER)
setattr(self, "labelResistance%sEhp" % tankType.capitalize(), lbl)
sizerResistances.Add(box, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER)
row+=1
col=0
sizerResistances.Add(box, wx.GBPosition(row, col), wx.GBSpan(1, 1), wx.ALIGN_CENTER)
row += 1
col = 0
self.stEHPs.SetToolTip(wx.ToolTip("Click to toggle between effective HP and raw HP"))
@@ -162,7 +164,7 @@ class ResistancesViewFull(StatsView):
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit()))
def refreshPanel(self, fit):
#If we did anything intresting, we'd update our labels to reflect the new fit's stats here
# If we did anything intresting, we'd update our labels to reflect the new fit's stats here
if fit is None and not self.showEffective:
self.showEffective = True
wx.PostEvent(self.mainFrame, EffectiveHpToggled(effective=True))
@@ -193,11 +195,11 @@ class ResistancesViewFull(StatsView):
total += ehp[tankType]
rrFactor = fit.ehp[tankType] / fit.hp[tankType]
lbl.SetLabel(formatAmount(ehp[tankType], 3, 0, 9))
lbl.SetToolTip(wx.ToolTip("%s: %d\nResist Multiplier: x%.2f" % (tankType.capitalize(), ehp[tankType], rrFactor)))
lbl.SetToolTip(
wx.ToolTip("%s: %d\nResist Multiplier: x%.2f" % (tankType.capitalize(), ehp[tankType], rrFactor)))
else:
lbl.SetLabel("0")
self.labelEhp.SetLabel("%s" % formatAmount(total, 3, 0, 9))
if self.showEffective:
self.stEff.SetLabel("( Effective HP: ")
@@ -206,10 +208,9 @@ class ResistancesViewFull(StatsView):
self.stEff.SetLabel("( Raw HP: ")
self.labelEhp.SetToolTip(wx.ToolTip("Raw: %d HP" % total))
damagePattern = fit.damagePattern if fit is not None and self.showEffective else None
damagePattern = fit.damagePattern if fit is not None and self.showEffective else None
total = sum((damagePattern.emAmount, damagePattern.thermalAmount,
damagePattern.kineticAmount, damagePattern.explosiveAmount)) if damagePattern is not None else 0
damagePattern.kineticAmount, damagePattern.explosiveAmount)) if damagePattern is not None else 0
for damageType in ("em", "thermal", "kinetic", "explosive"):
lbl = getattr(self, "gaugeResistanceDamagepattern%s" % damageType.capitalize())
@@ -224,4 +225,3 @@ class ResistancesViewFull(StatsView):
ResistancesViewFull.register()

View File

@@ -102,7 +102,8 @@ class ResourcesViewFull(StatsView):
base = sizerResources
sizer.AddSpacer((0, 0), 1, wx.EXPAND, 5)
# Turrets & launcher hardslots display
tooltipText = {"turret": "Turret hardpoints", "launcher": "Launcher hardpoints", "drones": "Drones active", "fighter": "Fighter squadrons active", "calibration": "Calibration"}
tooltipText = {"turret": "Turret hardpoints", "launcher": "Launcher hardpoints", "drones": "Drones active",
"fighter": "Fighter squadrons active", "calibration": "Calibration"}
for type_ in ("turret", "launcher", "drones", "fighter", "calibration"):
box = wx.BoxSizer(wx.HORIZONTAL)
@@ -114,7 +115,8 @@ class ResourcesViewFull(StatsView):
sizer.Add(box, 0, wx.ALIGN_CENTER)
suffix = {'turret': 'Hardpoints', 'launcher': 'Hardpoints', 'drones': 'Active', 'fighter': 'Tubes', 'calibration': 'Points'}
suffix = {'turret': 'Hardpoints', 'launcher': 'Hardpoints', 'drones': 'Active', 'fighter': 'Tubes',
'calibration': 'Points'}
lbl = wx.StaticText(parent, wx.ID_ANY, "0")
setattr(self, "label%sUsed%s%s" % (panel.capitalize(), type_.capitalize(), suffix[type_].capitalize()), lbl)
box.Add(lbl, 0, wx.ALIGN_CENTER | wx.LEFT, 5)
@@ -122,7 +124,8 @@ class ResourcesViewFull(StatsView):
box.Add(wx.StaticText(parent, wx.ID_ANY, "/"), 0, wx.ALIGN_CENTER)
lbl = wx.StaticText(parent, wx.ID_ANY, "0")
setattr(self, "label%sTotal%s%s" % (panel.capitalize(), type_.capitalize(), suffix[type_].capitalize()), lbl)
setattr(self, "label%sTotal%s%s" % (panel.capitalize(), type_.capitalize(), suffix[type_].capitalize()),
lbl)
box.Add(lbl, 0, wx.ALIGN_CENTER)
setattr(self, "boxSizer{}".format(type_.capitalize()), box)
@@ -132,7 +135,8 @@ class ResourcesViewFull(StatsView):
sizer.AddSpacer((0, 0), 1, wx.EXPAND, 5)
# PG, Cpu & drone stuff
tooltipText = {"cpu": "CPU", "pg": "PowerGrid", "droneBay": "Drone bay", "fighterBay": "Fighter bay", "droneBandwidth": "Drone bandwidth", "cargoBay": "Cargo bay"}
tooltipText = {"cpu": "CPU", "pg": "PowerGrid", "droneBay": "Drone bay", "fighterBay": "Fighter bay",
"droneBandwidth": "Drone bandwidth", "cargoBay": "Cargo bay"}
for i, group in enumerate((("cpu", "pg"), ("cargoBay", "droneBay", "fighterBay", "droneBandwidth"))):
main = wx.BoxSizer(wx.VERTICAL)
base.Add(main, 1, wx.ALIGN_CENTER)
@@ -164,7 +168,8 @@ class ResourcesViewFull(StatsView):
setattr(self, "label%sTotal%s" % (panel.capitalize(), capitalizedType), lbl)
absolute.Add(lbl, 0, wx.ALIGN_LEFT)
units = {"cpu": " tf", "pg": " MW", "droneBandwidth": " mbit/s", "droneBay": u" m\u00B3", "fighterBay": u" m\u00B3", "cargoBay": u" m\u00B3"}
units = {"cpu": " tf", "pg": " MW", "droneBandwidth": " mbit/s", "droneBay": u" m\u00B3",
"fighterBay": u" m\u00B3", "cargoBay": u" m\u00B3"}
lbl = wx.StaticText(parent, wx.ID_ANY, "%s" % units[type_])
absolute.Add(lbl, 0, wx.ALIGN_LEFT)

View File

@@ -133,14 +133,17 @@ class TargetingMiscViewFull(StatsView):
"specialSmallShipHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialSmallShipHoldCapacity"),
"specialMediumShipHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialMediumShipHoldCapacity"),
"specialLargeShipHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialLargeShipHoldCapacity"),
"specialIndustrialShipHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialIndustrialShipHoldCapacity"),
"specialIndustrialShipHoldCapacity": lambda: fit.ship.getModifiedItemAttr(
"specialIndustrialShipHoldCapacity"),
"specialOreHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialOreHoldCapacity"),
"specialMineralHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialMineralHoldCapacity"),
"specialMaterialBayCapacity": lambda: fit.ship.getModifiedItemAttr("specialMaterialBayCapacity"),
"specialGasHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialGasHoldCapacity"),
"specialSalvageHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialSalvageHoldCapacity"),
"specialCommandCenterHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialCommandCenterHoldCapacity"),
"specialPlanetaryCommoditiesHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialPlanetaryCommoditiesHoldCapacity"),
"specialCommandCenterHoldCapacity": lambda: fit.ship.getModifiedItemAttr(
"specialCommandCenterHoldCapacity"),
"specialPlanetaryCommoditiesHoldCapacity": lambda: fit.ship.getModifiedItemAttr(
"specialPlanetaryCommoditiesHoldCapacity"),
"specialQuafeHoldCapacity": lambda: fit.ship.getModifiedItemAttr("specialQuafeHoldCapacity")
}
@@ -196,7 +199,8 @@ class TargetingMiscViewFull(StatsView):
label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % fit.maxWarpDistance))
elif labelName == "labelSensorStr":
if fit.jamChance > 0:
label.SetToolTip(wx.ToolTip("Type: %s\n%.1f%% Chance of Jam" % (fit.scanType, fit.jamChance)))
label.SetToolTip(
wx.ToolTip("Type: %s\n%.1f%% Chance of Jam" % (fit.scanType, fit.jamChance)))
else:
label.SetToolTip(wx.ToolTip("Type: %s" % (fit.scanType)))
elif labelName == "labelFullAlignTime":
@@ -206,7 +210,8 @@ class TargetingMiscViewFull(StatsView):
label.SetToolTip(wx.ToolTip("%s\n%s\n%s" % (alignTime, mass, agility)))
elif labelName == "labelFullCargo":
tipLines = []
tipLines.append(u"Cargohold: {:,.2f}m\u00B3 / {:,.2f}m\u00B3".format(fit.cargoBayUsed, newValues["main"]))
tipLines.append(
u"Cargohold: {:,.2f}m\u00B3 / {:,.2f}m\u00B3".format(fit.cargoBayUsed, newValues["main"]))
for attrName, tipAlias in cargoNamesOrder.items():
if newValues[attrName] > 0:
tipLines.append(u"{}: {:,.2f}m\u00B3".format(tipAlias, newValues[attrName]))
@@ -235,7 +240,8 @@ class TargetingMiscViewFull(StatsView):
# if you add stuff to cargo, the capacity doesn't change and thus it is still cached
# This assures us that we force refresh of cargo tooltip
tipLines = []
tipLines.append(u"Cargohold: {:,.2f}m\u00B3 / {:,.2f}m\u00B3".format(fit.cargoBayUsed, cachedCargo["main"]))
tipLines.append(
u"Cargohold: {:,.2f}m\u00B3 / {:,.2f}m\u00B3".format(fit.cargoBayUsed, cachedCargo["main"]))
for attrName, tipAlias in cargoNamesOrder.items():
if cachedCargo[attrName] > 0:
tipLines.append(u"{}: {:,.2f}m\u00B3".format(tipAlias, cachedCargo[attrName]))