Skip to content

Commit 9500d65

Browse files
LukasParkeclaude
andcommitted
fix(python): make the resource management README snippet valid Python
The Resource Management README section rendered `with` and `async with` blocks whose bodies contained only a comment, so copying the snippet raised an IndentationError. Add a `pass` statement after the placeholder comment in both async modes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent c479885 commit 9500d65

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
id: 1792607797-a1ef7f0c
2+
features:
3+
- docs
4+
targets:
5+
- pythonv2
6+
type: fix
7+
bump: patch
8+
description: make the Resource Management README snippet valid Python
9+
author: LukasParke
10+
date: "2026-10-21"

‎templates/templates/pythonv2/readme/resource-management.stmpl‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ The `{{$sdkClassName}}` class implements the context manager protocol and regist
1616
def main():
1717
{{templateString "usage/init.stmpl" $syncCallContext | indentPresent 4}}
1818
# Rest of application here...
19+
pass
1920

2021

2122
# Or when using async:
2223
async def amain():
2324
{{templateString "usage/init.stmpl" $asyncCallContext | indentPresent 4}}
2425
# Rest of application here...
26+
pass
2527
```
2628
{{- end }}
2729
{{- else if eq .Global.Config.AsyncMode "split"}}
@@ -41,12 +43,14 @@ The `{{$sdkClassName}}` and `Async{{$sdkClassName}}` classes implement the conte
4143
def main():
4244
{{templateString "usage/init.stmpl" $syncCallContext | indentPresent 4}}
4345
# Rest of application here...
46+
pass
4447

4548

4649
# Or when using async:
4750
async def amain():
4851
{{templateString "usage/init.stmpl" $asyncCallContext | indentPresent 4}}
4952
# Rest of application here...
53+
pass
5054
```
5155
{{- end }}
5256
{{- end }}

‎zSDKs/sdk-pythonv2/README.md‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)