-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add _aenter_ helpers to v1 and v2 to allow version-specific functions via 'with ..' #482
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces asynchronous context manager methods ( Changes
Sequence DiagramsequenceDiagram
participant User
participant HomeWizardEnergyClass
User->>HomeWizardEnergyClass: async with HomeWizardEnergyClass() as instance
activate HomeWizardEnergyClass
HomeWizardEnergyClass-->>User: Returns instance
Note over User,HomeWizardEnergyClass: Perform async operations
User->>HomeWizardEnergyClass: Exit async context
deactivate HomeWizardEnergyClass
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #482 +/- ##
=======================================
Coverage 99.63% 99.63%
=======================================
Files 8 8
Lines 541 545 +4
Branches 40 40
=======================================
+ Hits 539 543 +4
Misses 1 1
Partials 1 1 ☔ View full report in Codecov by Sentry. |
async with HomeWizardEnergyV2(...) as api:
returned aHomeWizardEnergy
, not aHomeWizardEnergyV2
according to MyPy. So for this call 'get_token' is not known (as it only exists inHomeWizardEnergyV2
Summary by CodeRabbit
HomeWizardEnergyV1
andHomeWizardEnergyV2
classes