From ea827ce9480b83f069e3fb8f59d013bd1e33c00a Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 19:36:18 +0000 Subject: [PATCH] style: format code with Black and isort This commit fixes the style issues introduced in 1c26171 according to the output from Black and isort. Details: None --- tornadoAPI.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tornadoAPI.py b/tornadoAPI.py index ed1df371..32606892 100644 --- a/tornadoAPI.py +++ b/tornadoAPI.py @@ -338,7 +338,9 @@ def handle_buy(driver, stock, orderObj, loop): return try: - current_shares_element = driver.find_element(By.XPATH, '//*[@id="main-router"]/div[1]/div/div[4]/div') + current_shares_element = driver.find_element( + By.XPATH, '//*[@id="main-router"]/div[1]/div/div[4]/div' + ) has_current_shares = bool("sh" in current_shares_element.text.strip()) except NoSuchElementException: has_current_shares = False @@ -382,10 +384,15 @@ def handle_buy(driver, stock, orderObj, loop): try: cost_float = float(cost.replace("$", "").replace(",", "")) except ValueError: - printAndDiscord(f"Tornado: Invalid price format for {stock}: {cost}", loop) + printAndDiscord( + f"Tornado: Invalid price format for {stock}: {cost}", loop + ) return else: - printAndDiscord(f"Tornado: Price not available or in an unexpected format for {stock}: {cost}", loop) + printAndDiscord( + f"Tornado: Price not available or in an unexpected format for {stock}: {cost}", + loop, + ) return # Check if the available buying power is enough