Replace asyncio.iscoroutinefunction with inspect.iscoroutinefunction#2066
Conversation
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
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 (2)
📝 WalkthroughWalkthroughThis PR replaces the async function detection method in the WLED CLI from ChangesAsync function detection refactor
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 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 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 |
There was a problem hiding this comment.
Pull request overview
Replaces deprecated asyncio.iscoroutinefunction() calls with inspect.iscoroutinefunction() to address Python 3.16 deprecation warnings.
Changes:
- Swap
asyncio.iscoroutinefunctionforinspect.iscoroutinefunctioninasync_typer.py. - Same swap in
test_cli.py, replacing theasyncioimport withinspect.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/wled/cli/async_typer.py | Adds inspect import and uses inspect.iscoroutinefunction in callback and command decorators. |
| tests/test_cli.py | Replaces asyncio import with inspect and updates four assertions accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2066 +/- ##
===========================================
+ Coverage 58.61% 97.29% +38.68%
===========================================
Files 6 8 +2
Lines 662 1109 +447
Branches 143 112 -31
===========================================
+ Hits 388 1079 +691
+ Misses 270 20 -250
- Partials 4 10 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Replace deprecated
asyncio.iscoroutinefunction()withinspect.iscoroutinefunction()to address Python 3.16 deprecation warnings.Changes
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes