Skip to content

Commit b4265c6

Browse files
committed
fix(docs): make ai_shell.py compatible with sphinx-gallery
Move PEP 723 script metadata after the module docstring and add RST title with underline so sphinx-gallery recognizes the example correctly.
1 parent b215fd2 commit b4265c6

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

tests/examples/ai_shell.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# /// script
2-
# requires-python = ">=3.9"
3-
# dependencies = [
4-
# "openai",
5-
# "python-statemachine",
6-
# ]
7-
# ///
8-
"""AI Shell — a feature-rich coding assistant powered by python-statemachine.
1+
"""
2+
AI Shell -- coding assistant
3+
=============================
4+
5+
A feature-rich coding assistant powered by python-statemachine.
96
107
A standalone interactive CLI that uses the OpenAI SDK for LLM calls with
118
tool_use. Demonstrates **parallel states**, **compound states**,
@@ -25,6 +22,13 @@
2522
OPENAI_API_KEY=sk-... uv run --with openai python examples/ai_shell.py -v
2623
2724
"""
25+
# /// script
26+
# requires-python = ">=3.9"
27+
# dependencies = [
28+
# "openai",
29+
# "python-statemachine",
30+
# ]
31+
# ///
2832

2933
import itertools
3034
import json

0 commit comments

Comments
 (0)