Skip to content

Commit 5c7fa75

Browse files
committed
docs(toolbox-core): Update auth module docstring to guide using context manager.
1 parent 52abc96 commit 5c7fa75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/toolbox-core/src/toolbox_core/auth_methods.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
from toolbox_core import auth_methods
2121
2222
auth_token_provider = auth_methods.aget_google_id_token
23-
toolbox = ToolboxClient(
23+
async with ToolboxClient(
2424
URL,
2525
client_headers={"Authorization": auth_token_provider},
26-
)
27-
tools = await toolbox.load_toolset()
26+
) as toolbox:
27+
tools = await toolbox.load_toolset()
2828
"""
2929

3030
from datetime import datetime, timedelta, timezone

0 commit comments

Comments
 (0)