Skip to content

Commit cb4af97

Browse files
committed
Use PEP8 function names for SortedMap
1 parent 73d915f commit cb4af97

7 files changed

Lines changed: 13 additions & 13 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ mcp = DurableMCP(path="/mcp")
5656
async def add(a: int, b: int, context: DurableContext) -> int:
5757
"""Add two numbers and also store result in `SortedMap`."""
5858
result = a + b
59-
await SortedMap.ref("adds").Insert(
59+
await SortedMap.ref("adds").insert(
6060
context,
6161
entries={f"{a} + {b}": f"{result}".encode()},
6262
)

tests/test_notifications_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def add(a: int, b: int, context: DurableContext) -> int:
2222
"""Add two numbers and also store result in `SortedMap`."""
2323
# `DurableContext` can be used for making Reboot specific calls, can
2424
# also use `at_least_once`, `at_most_once`, `until`, etc!
25-
await SortedMap.ref("adds").Insert(
25+
await SortedMap.ref("adds").insert(
2626
context,
2727
entries={f"{a} + {b}": f"{a + b}".encode()},
2828
)
@@ -174,7 +174,7 @@ async def message_handler_expecting_no_messages(
174174
app_internal=True,
175175
)
176176

177-
response = await SortedMap.ref("adds").Range(context, limit=2)
177+
response = await SortedMap.ref("adds").range(context, limit=2)
178178
print(response)
179179

180180

tests/test_notifications_progress.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async def add(a: int, b: int, context: DurableContext) -> int:
1919
"""Add two numbers and also store result in `SortedMap`."""
2020
# `ToolContext` can be used for making Reboot specific calls, can
2121
# also use `at_least_once`, `at_most_once`, `until`, etc!
22-
await SortedMap.ref("adds").Insert(
22+
await SortedMap.ref("adds").insert(
2323
context,
2424
entries={f"{a} + {b}": f"{a + b}".encode()},
2525
)
@@ -160,7 +160,7 @@ async def on_resumption_token_update(token: str) -> None:
160160
app_internal=True,
161161
)
162162

163-
response = await SortedMap.ref("adds").Range(context, limit=2)
163+
response = await SortedMap.ref("adds").range(context, limit=2)
164164
print(response)
165165

166166

tests/test_notifications_prompts_list_changed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def add(a: int, b: int, context: DurableContext) -> int:
2020
"""Add two numbers and also store result in `SortedMap`."""
2121
# `ToolContext` can be used for making Reboot specific calls, can
2222
# also use `at_least_once`, `at_most_once`, `until`, etc!
23-
await SortedMap.ref("adds").Insert(
23+
await SortedMap.ref("adds").insert(
2424
context,
2525
entries={f"{a} + {b}": f"{a + b}".encode()},
2626
)
@@ -184,7 +184,7 @@ async def message_handler_expecting_no_messages(
184184
app_internal=True,
185185
)
186186

187-
response = await SortedMap.ref("adds").Range(context, limit=2)
187+
response = await SortedMap.ref("adds").range(context, limit=2)
188188
print(response)
189189

190190

tests/test_notifications_resources_list_changed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def add(a: int, b: int, context: DurableContext) -> int:
2020
"""Add two numbers and also store result in `SortedMap`."""
2121
# `ToolContext` can be used for making Reboot specific calls, can
2222
# also use `at_least_once`, `at_most_once`, `until`, etc!
23-
await SortedMap.ref("adds").Insert(
23+
await SortedMap.ref("adds").insert(
2424
context,
2525
entries={f"{a} + {b}": f"{a + b}".encode()},
2626
)
@@ -184,7 +184,7 @@ async def message_handler_expecting_no_messages(
184184
app_internal=True,
185185
)
186186

187-
response = await SortedMap.ref("adds").Range(context, limit=2)
187+
response = await SortedMap.ref("adds").range(context, limit=2)
188188
print(response)
189189

190190

tests/test_notifications_resources_list_changed_after_reconnect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def add(a: int, b: int, context: DurableContext) -> int:
2020
"""Add two numbers and also store result in `SortedMap`."""
2121
# `ToolContext` can be used for making Reboot specific calls, can
2222
# also use `at_least_once`, `at_most_once`, `until`, etc!
23-
await SortedMap.ref("adds").Insert(
23+
await SortedMap.ref("adds").insert(
2424
context,
2525
entries={f"{a} + {b}": f"{a + b}".encode()},
2626
)
@@ -184,7 +184,7 @@ async def message_handler(
184184
app_internal=True,
185185
)
186186

187-
response = await SortedMap.ref("adds").Range(context, limit=2)
187+
response = await SortedMap.ref("adds").range(context, limit=2)
188188
print(response)
189189

190190

tests/test_notifications_tools_list_changed.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def add(a: int, b: int, context: DurableContext) -> int:
2020
"""Add two numbers and also store result in `SortedMap`."""
2121
# `ToolContext` can be used for making Reboot specific calls, can
2222
# also use `at_least_once`, `at_most_once`, `until`, etc!
23-
await SortedMap.ref("adds").Insert(
23+
await SortedMap.ref("adds").insert(
2424
context,
2525
entries={f"{a} + {b}": f"{a + b}".encode()},
2626
)
@@ -184,7 +184,7 @@ async def message_handler_expecting_no_messages(
184184
app_internal=True,
185185
)
186186

187-
response = await SortedMap.ref("adds").Range(context, limit=2)
187+
response = await SortedMap.ref("adds").range(context, limit=2)
188188
print(response)
189189

190190

0 commit comments

Comments
 (0)