From 0f96441a7c177dfc0d1f895ca014b215fa8b4d1c Mon Sep 17 00:00:00 2001 From: Sydney Runkle Date: Thu, 1 May 2025 13:40:39 -0400 Subject: [PATCH] docstrings for sdk-py --- libs/sdk-py/langgraph_sdk/auth/__init__.py | 2 +- libs/sdk-py/langgraph_sdk/auth/exceptions.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/sdk-py/langgraph_sdk/auth/__init__.py b/libs/sdk-py/langgraph_sdk/auth/__init__.py index e0dff9c49..01dfd9143 100644 --- a/libs/sdk-py/langgraph_sdk/auth/__init__.py +++ b/libs/sdk-py/langgraph_sdk/auth/__init__.py @@ -195,7 +195,7 @@ class Auth: - authorization (str | None): The Authorization header value (e.g., "Bearer ") Args: - fn (Callable): The authentication handler function to register. + fn: The authentication handler function to register. Must return a representation of the user. This could be a: - string (the user id) - dict containing {"identity": str, "permissions": list[str]} diff --git a/libs/sdk-py/langgraph_sdk/auth/exceptions.py b/libs/sdk-py/langgraph_sdk/auth/exceptions.py index cd3019259..52b4de668 100644 --- a/libs/sdk-py/langgraph_sdk/auth/exceptions.py +++ b/libs/sdk-py/langgraph_sdk/auth/exceptions.py @@ -10,10 +10,10 @@ class HTTPException(Exception): Since this is defined in the auth module, we default to a 401 status code. Args: - status_code (int, optional): HTTP status code for the error. Defaults to 401 "Unauthorized". - detail (str | None, optional): Detailed error message. If None, uses a default + status_code: HTTP status code for the error. Defaults to 401 "Unauthorized". + detail: Detailed error message. If None, uses a default message based on the status code. - headers (typing.Mapping[str, str] | None, optional): Additional HTTP headers to + headers: Additional HTTP headers to include in the error response. Example: