docstrings for sdk-py

This commit is contained in:
Sydney Runkle
2025-05-01 13:40:39 -04:00
parent 6c6bfbc63a
commit 0f96441a7c
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -195,7 +195,7 @@ class Auth:
- authorization (str | None): The Authorization header value (e.g., "Bearer <token>")
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]}
+3 -3
View File
@@ -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: