Skip to content

Commit

Permalink
Comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Aug 21, 2014
1 parent 4dedb27 commit 770ee80
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tradecalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def detail(self, detail=0):
text += "At %s/%s, Buy:" % (route[i].system.str().upper(), route[i].station)
separator = "\n | " if detail > 1 else ""
for (item, qty) in sorted(hop[0], key=lambda item: item[1] * item[0].gainCr, reverse=True):
if detail:
if detail:
text += "%s %4d x %-30s" % (separator, qty, item.item)
text += " @ %8scr each, %8scr total" % (localedNo(item.costCr), localedNo(item.costCr * qty))
else:
Expand Down Expand Up @@ -203,7 +203,12 @@ def _fit_combos(offset, cr, cap):
return bestLoad

def getBestTrade(self, src, dst, credits, capacity=None, avoidItems=None, focusItems=None, fitFunction=None):
""" Find the most profitable trade between stations src and dst. """
"""
Find the most profitable trade between stations src and dst.
If avoidItems is populated, the items in it will not be considered for trading.
If focusItems is populated, only items listed in it will be considered for trading.
'fitFunction' lets you specify a function to use for performing the fit.
"""
if not avoidItems: avoidItems = []
if not focusItems: focusItems = []
if self.debug: print("# %s -> %s with %dcr" % (src, dst, credits))
Expand Down

0 comments on commit 770ee80

Please sign in to comment.