diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 253b123d5..a516665ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -277,9 +277,9 @@ def my_function(arg1: int, arg2: str) -> float: Examples: This is a section for examples of how to use the function. - .. code-block:: python - - my_function(1, "hello") + ```python + my_function(1, "hello") + \``` Args: arg1: This is a description of arg1. We do not need to specify the type since diff --git a/libs/langgraph/langgraph/graph/ui.py b/libs/langgraph/langgraph/graph/ui.py index 3d2229968..8cc4887a5 100644 --- a/libs/langgraph/langgraph/graph/ui.py +++ b/libs/langgraph/langgraph/graph/ui.py @@ -89,13 +89,12 @@ def push_ui_message( The created UI message. Example: - - .. code-block:: python - + ```python push_ui_message( name="component-name", props={"content": "Hello world"}, ) + ``` """ from langgraph._internal._constants import CONFIG_KEY_SEND @@ -146,10 +145,9 @@ def delete_ui_message(id: str, *, state_key: str = "ui") -> RemoveUIMessage: The remove UI message. Example: - - .. code-block:: python - + ```python delete_ui_message("message-123") + ``` """ from langgraph._internal._constants import CONFIG_KEY_SEND @@ -183,13 +181,12 @@ def ui_message_reducer( Combined list of UI messages with removals applied. Example: - - .. code-block:: python - + ```python messages = ui_message_reducer( [{"type": "ui", "id": "1", "name": "Chat", "props": {}}], {"type": "remove-ui", "id": "1"}, ) + ``` """ if not isinstance(left, list):