Skip to content

Commit

Permalink
style: format code with Black and isort
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 7d99d29 according to the output
from Black and isort.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Nov 4, 2024
1 parent 7d99d29 commit e16139b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions sofiAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,15 @@ async def handle_2fa(page, account, name, botObj, discord_loop):
secret = None
if secret is not None:
try:
remember = await asyncio.wait_for(page.select("input[id=rememberBrowser]"), timeout=5)
remember = await asyncio.wait_for(
page.select("input[id=rememberBrowser]"), timeout=5
)
if remember:
await remember.click()
except asyncio.TimeoutError:
print(f"'rememberBrowser' checkbox not found for {name}. Continuing without it...")
print(
f"'rememberBrowser' checkbox not found for {name}. Continuing without it..."
)

# Continue with 2FA input
twofa_input = await page.select("input[id=code]")
Expand Down Expand Up @@ -443,11 +447,15 @@ async def handle_2fa(page, account, name, botObj, discord_loop):
if sms_2fa_element:
# SMS 2FA handling
try:
remember = await asyncio.wait_for(page.select("input[id=rememberBrowser]"), timeout=5)
remember = await asyncio.wait_for(
page.select("input[id=rememberBrowser]"), timeout=5
)
if remember:
await remember.click()
except asyncio.TimeoutError:
print(f"'rememberBrowser' checkbox not found for {name}. Continuing without it...")
print(
f"'rememberBrowser' checkbox not found for {name}. Continuing without it..."
)

sms2fa_input = await page.select("input[id=code]")
if not sms2fa_input:
Expand Down

0 comments on commit e16139b

Please sign in to comment.