From f8923b64fbe44f0ce49f5997559ec48b2d2c6fa5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:13:41 +0000 Subject: [PATCH] style: format code with Black and isort This commit fixes the style issues introduced in c8a3321 according to the output from Black and isort. Details: None --- autoRSA.py | 9 +++++++-- helperAPI.py | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/autoRSA.py b/autoRSA.py index c7263150..ce30bc7b 100644 --- a/autoRSA.py +++ b/autoRSA.py @@ -198,7 +198,10 @@ def fun_run(orderObj: stockOrder, command, botObj=None, loop=None): ) # Add to total sum totalValue += sum( - account["total"] for account in orderObj.get_logged_in(broker).get_account_totals().values() + account["total"] + for account in orderObj.get_logged_in(broker) + .get_account_totals() + .values() ) except Exception as ex: print(traceback.format_exc()) @@ -208,7 +211,9 @@ def fun_run(orderObj: stockOrder, command, botObj=None, loop=None): # Print final total value and closing message if "_holdings" in command: - printAndDiscord(f"Total Value of All Accounts: ${format(totalValue, '0.2f')}", loop) + printAndDiscord( + f"Total Value of All Accounts: ${format(totalValue, '0.2f')}", loop + ) printAndDiscord("All commands complete in all brokers", loop) else: print(f"Error: {command} is not a valid command") diff --git a/helperAPI.py b/helperAPI.py index 3daa0b41..8ff454c6 100644 --- a/helperAPI.py +++ b/helperAPI.py @@ -257,7 +257,9 @@ def set_account_totals(self, parent_name: str, account_name: str, total: float): self.__account_totals[parent_name] = {} self.__account_totals[parent_name][account_name] = round(float(total), 2) self.__account_totals[parent_name]["total"] = sum( - value for key, value in self.__account_totals[parent_name].items() if key != "total" + value + for key, value in self.__account_totals[parent_name].items() + if key != "total" ) def set_account_type(self, parent_name: str, account_name: str, account_type: str):