From 54d484dc4afef0cc5b57e33475ccc7348fb2ec29 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Wed, 14 Jun 2023 13:30:53 -0700 Subject: [PATCH] remove unnessary variable assignemtn when calculating costs/profies --- app/star_citizen.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/star_citizen.py b/app/star_citizen.py index 6defa492..8f3192c5 100644 --- a/app/star_citizen.py +++ b/app/star_citizen.py @@ -226,8 +226,7 @@ async def calculate_trade_profies(commodity, scu=None): for systems, stations in response.items(): for station, trades in stations.items(): if "buy" in trades and commodity in trades["buy"]: - cost_to_fill = trades["buy"][commodity] * int(scu) - costs[station] = cost_to_fill + costs[station] = trades["buy"][commodity] * int(scu) embed.add_field( name="**Cheapest place to fill %s**" % scu_string, @@ -244,8 +243,7 @@ async def calculate_trade_profies(commodity, scu=None): for systems, stations in response.items(): for station, trades in stations.items(): if "sell" in trades and commodity in trades["sell"]: - net_profit = trades["sell"][commodity] * int(scu) - profits[station] = net_profit + profits[station] = trades["sell"][commodity] * int(scu) embed.add_field( name="Most profitable place to sell %s" % scu_string,