MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / formatPrice

Function formatPrice

gui/builtinViewColumns/price.py:34–43  ·  view source on GitHub ↗
(stuff, priceObj)

Source from the content-addressed store, hash-verified

32
33
34def formatPrice(stuff, priceObj):
35 textItems = []
36 if priceObj.price:
37 mult = 1
38 if isinstance(stuff, (Drone, Fighter, Cargo)):
39 mult = stuff.amount
40 textItems.append(formatAmount(priceObj.price * mult, 3, 3, 9, currency=True))
41 if priceObj.status in (PriceStatus.fetchFail, PriceStatus.fetchTimeout):
42 textItems.append("(!)")
43 return " ".join(textItems)
44
45
46class Price(ViewColumn):

Callers 2

getTextMethod · 0.85
callbackMethod · 0.85

Calls 2

formatAmountFunction · 0.90
appendMethod · 0.45

Tested by

no test coverage detected