diff --git a/.changesets/1792607797-a1ef7f0c.yaml b/.changesets/1792607797-a1ef7f0c.yaml new file mode 100644 index 000000000..b75464e56 --- /dev/null +++ b/.changesets/1792607797-a1ef7f0c.yaml @@ -0,0 +1,10 @@ +id: 1792607797-a1ef7f0c +features: + - docs +targets: + - pythonv2 +type: fix +bump: patch +description: make the Resource Management README snippet valid Python +author: LukasParke +date: "2026-10-21" diff --git a/templates/templates/pythonv2/readme/resource-management.stmpl b/templates/templates/pythonv2/readme/resource-management.stmpl index 4f08ca004..8470c49ab 100644 --- a/templates/templates/pythonv2/readme/resource-management.stmpl +++ b/templates/templates/pythonv2/readme/resource-management.stmpl @@ -16,12 +16,14 @@ The `{{$sdkClassName}}` class implements the context manager protocol and regist def main(): {{templateString "usage/init.stmpl" $syncCallContext | indentPresent 4}} # Rest of application here... + pass # Or when using async: async def amain(): {{templateString "usage/init.stmpl" $asyncCallContext | indentPresent 4}} # Rest of application here... + pass ``` {{- end }} {{- else if eq .Global.Config.AsyncMode "split"}} @@ -41,12 +43,14 @@ The `{{$sdkClassName}}` and `Async{{$sdkClassName}}` classes implement the conte def main(): {{templateString "usage/init.stmpl" $syncCallContext | indentPresent 4}} # Rest of application here... + pass # Or when using async: async def amain(): {{templateString "usage/init.stmpl" $asyncCallContext | indentPresent 4}} # Rest of application here... + pass ``` {{- end }} {{- end }} \ No newline at end of file diff --git a/zSDKs/sdk-pythonv2/README.md b/zSDKs/sdk-pythonv2/README.md index bcd169251..ab092adf1 100644 --- a/zSDKs/sdk-pythonv2/README.md +++ b/zSDKs/sdk-pythonv2/README.md @@ -1751,6 +1751,7 @@ def main(): with SDK() as sdk: # Rest of application here... + pass # Or when using async: @@ -1758,6 +1759,7 @@ async def amain(): async with AsyncSDK() as sdk: # Rest of application here... + pass ```