Skip to content

Commit efdd3b6

Browse files
committed
lint fix
1 parent ec43295 commit efdd3b6

File tree

3 files changed

+19
-20
lines changed

3 files changed

+19
-20
lines changed

β€Žscripts/download-binary.pyβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
python scripts/download-binary.py
1313
python scripts/download-binary.py --version v3.2.0
1414
"""
15+
from __future__ import annotations
1516

1617
import sys
17-
import platform
1818
import argparse
19+
import platform
1920
import urllib.request
2021
from pathlib import Path
2122

β€Žtest_local_mode.pyβ€Ž

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
# Set required API key for LLM operations
1313
if not os.environ.get("OPENAI_API_KEY"):
14-
print("❌ Error: OPENAI_API_KEY environment variable not set")
15-
print(" Set it with: export OPENAI_API_KEY='sk-proj-...'")
14+
print("❌ Error: OPENAI_API_KEY environment variable not set") # noqa: T201
15+
print(" Set it with: export OPENAI_API_KEY='sk-proj-...'") # noqa: T201
1616
sys.exit(1)
1717

18-
print("πŸš€ Testing local server mode...")
18+
print("πŸš€ Testing local server mode...") # noqa: T201
1919

2020
try:
2121
# Create client in local mode - will use bundled binary
22-
print("πŸ“¦ Creating Stagehand client in local mode...")
22+
print("πŸ“¦ Creating Stagehand client in local mode...") # noqa: T201
2323
client = Stagehand(
2424
server="local",
2525
browserbase_api_key="local", # Dummy value - not used in local mode
@@ -30,7 +30,7 @@
3030
local_ready_timeout_s=15.0, # Give it time to start
3131
)
3232

33-
print("πŸ”§ Starting session (this will start the local server)...")
33+
print("πŸ”§ Starting session (this will start the local server)...") # noqa: T201
3434
session = client.sessions.start(
3535
model_name="openai/gpt-5-nano",
3636
browser={
@@ -40,36 +40,36 @@
4040
)
4141
session_id = session.data.session_id
4242

43-
print(f"βœ… Session started: {session_id}")
44-
print(f"🌐 Server running at: {client.base_url}")
43+
print(f"βœ… Session started: {session_id}") # noqa: T201
44+
print(f"🌐 Server running at: {client.base_url}") # noqa: T201
4545

46-
print("\nπŸ“ Navigating to example.com...")
46+
print("\nπŸ“ Navigating to example.com...") # noqa: T201
4747
client.sessions.navigate(
4848
id=session_id,
4949
url="https://example.com",
5050
frame_id="",
5151
)
52-
print("βœ… Navigation complete")
52+
print("βœ… Navigation complete") # noqa: T201
5353

54-
print("\nπŸ” Extracting page heading...")
54+
print("\nπŸ” Extracting page heading...") # noqa: T201
5555
result = client.sessions.extract(
5656
id=session_id,
5757
instruction="Extract the main heading text from the page",
5858
)
59-
print(f"πŸ“„ Extracted: {result.data.result}")
59+
print(f"πŸ“„ Extracted: {result.data.result}") # noqa: T201
6060

61-
print("\nπŸ›‘ Ending session...")
61+
print("\nπŸ›‘ Ending session...") # noqa: T201
6262
client.sessions.end(id=session_id)
63-
print("βœ… Session ended")
63+
print("βœ… Session ended") # noqa: T201
6464

65-
print("\nπŸ”Œ Closing client (will shut down server)...")
65+
print("\nπŸ”Œ Closing client (will shut down server)...") # noqa: T201
6666
client.close()
67-
print("βœ… Server shut down successfully!")
67+
print("βœ… Server shut down successfully!") # noqa: T201
6868

69-
print("\nπŸŽ‰ All tests passed!")
69+
print("\nπŸŽ‰ All tests passed!") # noqa: T201
7070

7171
except Exception as e:
72-
print(f"\n❌ Error: {e}")
72+
print(f"\n❌ Error: {e}") # noqa: T201
7373
import traceback
7474
traceback.print_exc()
7575
sys.exit(1)

β€Žtests/api_resources/test_sessions.pyβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ def test_method_end(self, client: Stagehand) -> None:
174174
def test_method_end_with_all_params(self, client: Stagehand) -> None:
175175
session = client.sessions.end(
176176
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
177-
_force_body={},
178177
x_language="typescript",
179178
x_sdk_version="3.0.6",
180179
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),
@@ -985,7 +984,6 @@ async def test_method_end(self, async_client: AsyncStagehand) -> None:
985984
async def test_method_end_with_all_params(self, async_client: AsyncStagehand) -> None:
986985
session = await async_client.sessions.end(
987986
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
988-
_force_body={},
989987
x_language="typescript",
990988
x_sdk_version="3.0.6",
991989
x_sent_at=parse_datetime("2025-01-15T10:30:00Z"),

0 commit comments

Comments
Β (0)