Skip to content

Commit c842d01

Browse files
committed
remove claude generated examples
1 parent 17ca402 commit c842d01

File tree

5 files changed

+3
-88
lines changed

5 files changed

+3
-88
lines changed

pydantic_graph/pydantic_graph/v2/__init__.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,22 @@
88
- Mermaid diagram generation for graph visualization
99
"""
1010

11-
from .decision import Decision
1211
from .graph import Graph
1312
from .graph_builder import GraphBuilder
14-
from .join import DictReducer, Join, ListReducer, NullReducer, Reducer
15-
from .node import EndNode, Fork, StartNode
16-
from .step import Step, StepContext, StepNode
13+
from .join import DictReducer, ListReducer, NullReducer, Reducer
14+
from .node import EndNode, StartNode
15+
from .step import StepContext, StepNode
1716
from .util import TypeExpression
1817

1918
__all__ = (
20-
'Decision',
2119
'DictReducer',
2220
'EndNode',
23-
'Fork',
2421
'Graph',
2522
'GraphBuilder',
26-
'Join',
2723
'ListReducer',
2824
'NullReducer',
2925
'Reducer',
3026
'StartNode',
31-
'Step',
3227
'StepContext',
3328
'StepNode',
3429
'TypeExpression',

pydantic_graph/pydantic_graph/v2/graph.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,6 @@ class Graph(Generic[StateT, DepsT, InputT, OutputT]):
9898
DepsT: The type of the dependencies
9999
InputT: The type of the input data
100100
OutputT: The type of the output data
101-
102-
Example:
103-
```python
104-
# Create a simple graph
105-
g = GraphBuilder[MyState, MyDeps, str, int]()
106-
107-
... # Build the graph here
108-
109-
graph = g.build()
110-
111-
# Run the graph
112-
result = await graph.run(
113-
state=MyState(),
114-
deps=MyDeps(),
115-
inputs="input_data"
116-
)
117-
```
118101
"""
119102

120103
name: str | None

pydantic_graph/pydantic_graph/v2/graph_builder.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ def join(
8585
8686
Returns:
8787
Either a Join instance or a decorator function
88-
89-
Example:
90-
```python
91-
# As a decorator
92-
@join(node_id="collect_results")
93-
class MyReducer(ListReducer[str]): ...
94-
95-
# Or called directly
96-
my_join = join(ListReducer, node_id="collect_results")
97-
```
9888
"""
9989
if reducer_type is None:
10090

@@ -127,20 +117,6 @@ class GraphBuilder(Generic[StateT, DepsT, GraphInputT, GraphOutputT]):
127117
DepsT: The type of the dependencies
128118
GraphInputT: The type of the graph input data
129119
GraphOutputT: The type of the graph output data
130-
131-
Example:
132-
```python
133-
builder = GraphBuilder[MyState, MyDeps, str, int]()
134-
135-
@builder.step
136-
async def process_data(ctx: StepContext[MyState, MyDeps, str]) -> int:
137-
return len(ctx.inputs)
138-
139-
builder.add_edge(builder.start_node, process_data)
140-
builder.add_edge(process_data, builder.end_node)
141-
142-
graph = builder.build()
143-
```
144120
"""
145121

146122
name: str | None
@@ -318,17 +294,6 @@ def step(
318294
319295
Returns:
320296
Either a Step instance or a decorator function
321-
322-
Example:
323-
```python
324-
# As a decorator
325-
@builder.step(node_id="process", label="Process Data")
326-
async def process_data(ctx: StepContext[MyState, MyDeps, str]) -> int:
327-
return len(ctx.inputs)
328-
329-
# Or called directly
330-
step = builder.step(process_data, node_id="process")
331-
```
332297
"""
333298
if call is None:
334299
return self._step(node_id=node_id, label=label)
@@ -368,12 +333,6 @@ def join(
368333
369334
Returns:
370335
Either a Join instance or a decorator function
371-
372-
Example:
373-
```python
374-
# Create a join that collects results into a list
375-
collect_join = builder.join(ListReducer, node_id="collect_results")
376-
```
377336
"""
378337
if reducer_factory is None:
379338
return join(node_id=node_id)

pydantic_graph/pydantic_graph/v2/join.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,6 @@ class Join(Generic[StateT, DepsT, InputT, OutputT]):
179179
DepsT: The type of the dependencies
180180
InputT: The type of input data to join
181181
OutputT: The type of the final joined output
182-
183-
Example:
184-
```python
185-
# Create a join that collects results into a list
186-
join = Join(
187-
id=JoinId("collect_results"),
188-
reducer_type=ListReducer[str],
189-
joins=ForkId("parallel_tasks")
190-
)
191-
```
192182
"""
193183

194184
def __init__(

pydantic_graph/pydantic_graph/v2/step.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,6 @@ class Step(Generic[StateT, DepsT, InputT, OutputT]):
121121
DepsT: The type of the dependencies
122122
InputT: The type of the input data
123123
OutputT: The type of the output data
124-
125-
Example:
126-
```python
127-
async def my_step(ctx: StepContext[MyState, MyDeps, str]) -> int:
128-
return len(ctx.inputs)
129-
130-
step = Step(
131-
id=NodeId("process_string"),
132-
call=my_step,
133-
user_label="Process String Length"
134-
)
135-
```
136124
"""
137125

138126
def __init__(

0 commit comments

Comments
 (0)