File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
packages/toolbox-core/src/toolbox_core Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -176,9 +176,22 @@ def add_headers(
176
176
self .__async_client .add_headers (headers )
177
177
178
178
def __enter__ (self ):
179
- """Enter the runtime context related to this client instance."""
179
+ """
180
+ Enter the runtime context related to this client instance.
181
+
182
+ Allows the client to be used as a context manager
183
+ (e.g., `with ToolboxSyncClient(...) as client:`).
184
+
185
+ Returns:
186
+ self: The client instance itself.
187
+ """
180
188
return self
181
189
182
190
def __exit__ (self , exc_type , exc_val , exc_tb ):
183
- """Exit the runtime context and close the client session."""
191
+ """
192
+ Exit the runtime context and close the internally managed session.
193
+
194
+ Allows the client to be used as a context manager
195
+ (e.g., `with ToolboxSyncClient(...) as client:`).
196
+ """
184
197
self .close ()
You can’t perform that action at this time.
0 commit comments