From 427ca151d351358b74fb665c12e6168c2e254ed8 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Sun, 2 Nov 2014 14:59:23 -0800 Subject: [PATCH] tabs to spaces --- tradecalc.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tradecalc.py b/tradecalc.py index 2a1c1775..79a04ede 100644 --- a/tradecalc.py +++ b/tradecalc.py @@ -238,17 +238,17 @@ def _fitCombos(offset, cr, cap): # Adjust for age for "M"/"H" items with low units. if item.stock < maxQty and item.stock > 0: # -1 = unknown - level = item.stockLevel - if level > 1: - # Assume 2 units per 10 minutes for high, - # 1 unit per 15 minutes for medium - units = level - 1 - interval = (30 / level) * 60 - speculativeRecovery = units * math.floor(item.srcAge / interval) - else: - # Low / Unknown - don't try to guess - speculativeRecovery = 0 - maxQty = min(maxQty, item.stock + speculativeRecovery) + level = item.stockLevel + if level > 1: + # Assume 2 units per 10 minutes for high, + # 1 unit per 15 minutes for medium + units = level - 1 + interval = (30 / level) * 60 + speculativeRecovery = units * math.floor(item.srcAge / interval) + else: + # Low / Unknown - don't try to guess + speculativeRecovery = 0 + maxQty = min(maxQty, item.stock + speculativeRecovery) if maxQty > 0: loadItems = [[item, maxQty]]