fix(openai): remove redundant try/finally in ResponseStream close and aclose - #4080
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughResponseStream.close() and ResponseStream.aclose() now call _ensure_cleanup() directly, then conditionally delegate to the wrapped stream's close/aclose when present, removing the previous try/finally around the cleanup call. ChangesResponseStream cleanup delegation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
2c6aa65 to
40faa87
Compare
40faa87 to
4d6f7e0
Compare
Fixes #3969 — Python 3.14 SyntaxWarning caused by return statement inside finally block in ResponseStream close/aclose
Summary by CodeRabbit