Skip to content

Commit 6eedef2

Browse files
committed
lint
1 parent 477a09a commit 6eedef2

6 files changed

+9
-12
lines changed

examples/e2e/test_playwright.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pytest
55
from dotenv import load_dotenv
66
from playwright.sync_api import Playwright, sync_playwright
7+
78
from browserbase import Browserbase
89

910
from .. import (

examples/playwright_captcha.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from playwright.sync_api import Playwright, ConsoleMessage, sync_playwright
22

3-
43
from examples import BROWSERBASE_PROJECT_ID, bb
54

65
DEFAULT_CAPTCHA_URL = "https://www.google.com/recaptcha/api2/demo"

examples/playwright_contexts.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
import time
22
from typing import Optional
3-
from pydantic import TypeAdapter
43

4+
from pydantic import TypeAdapter
55
from playwright.sync_api import Cookie, Browser, Playwright, sync_playwright
66

7-
87
from examples import BROWSERBASE_PROJECT_ID, bb
98
from browserbase.types.session_create_params import (
109
BrowserSettings,
1110
BrowserSettingsContext,
1211
)
1312

14-
1513
CONTEXT_TEST_URL = "https://www.browserbase.com"
1614
SECOND = 1000
1715

examples/playwright_downloads.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from playwright.sync_api import Playwright, sync_playwright
66

7-
87
from examples import BROWSERBASE_PROJECT_ID, bb
98

109
download_re = re.compile(r"sandstorm-(\d{13})+\.mp3")

examples/playwright_proxy.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from playwright.sync_api import Page, Playwright, sync_playwright
44

55
from examples import (
6-
BROWSERBASE_API_KEY,
76
BROWSERBASE_PROJECT_ID,
87
bb,
98
)

examples/selenium_basic.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
from examples import bb, BROWSERBASE_PROJECT_ID, BROWSERBASE_API_KEY
1+
from typing import Dict
2+
23
from selenium import webdriver
34
from selenium.webdriver.remote.remote_connection import RemoteConnection
4-
from typing import Dict
5+
6+
from examples import BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID, bb
57

68

79
class BrowserbaseConnection(RemoteConnection):
@@ -24,10 +26,10 @@ def get_remote_connection_headers( # type: ignore
2426
headers["x-bb-api-key"] = BROWSERBASE_API_KEY
2527
headers["session-id"] = self.session_id
2628

27-
return headers
29+
return headers # type: ignore
2830

2931

30-
def run():
32+
def run() -> None:
3133
# Use the custom class to create and connect to a new browser session
3234
session = bb.sessions.create(project_id=BROWSERBASE_PROJECT_ID)
3335
connection = BrowserbaseConnection(session.id, session.selenium_remote_url)
@@ -50,8 +52,7 @@ def run():
5052

5153
finally:
5254
# Make sure to quit the driver so your session is ended!
53-
print("Quitting driver")
54-
# driver.quit()
55+
driver.quit()
5556

5657

5758
if __name__ == "__main__":

0 commit comments

Comments
 (0)