Repository navigation
Add global getter to setup_dialogs - #525
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 (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughAdds an optional Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Setup as setup_dialogs()
participant Factory as DefaultManagerFactory
participant Manager as ManagerImpl
participant Getter as DataGetter
participant Payload as Payload
User->>Setup: call setup_dialogs(getter=...)
Setup->>Factory: create DefaultManagerFactory(getter)
Factory->>Manager: instantiate ManagerImpl(getter)
Note over Manager: later, during load_data()
Manager->>Getter: await getter(**middleware_data)
Getter-->>Manager: return computed_fields
Manager->>Payload: merge computed_fields into payload
Payload-->>Manager: enriched payload returned
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 Tip CodeRabbit can use your project's `ruff` configuration to improve the quality of Python code reviews.Add a Ruff configuration file to your project to customize how CodeRabbit runs |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/aiogram_dialog/manager/manager.py`:
- Around line 81-82: ManagerImpl.__init__ currently types the parameter getter
as DataGetter but DefaultManagerFactory passes getter: DataGetter | None; change
the getter parameter and the stored attribute (self._getter) types to allow None
(DataGetter | None) so the signatures align with DefaultManagerFactory, keeping
the existing runtime None checks (e.g., the “if self._getter:” guard) unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9b391a73-5042-43b1-afa2-963c0eddb4e7
📒 Files selected for processing (4)
docs/widgets/passing_data/index.rstsrc/aiogram_dialog/manager/manager.pysrc/aiogram_dialog/manager/manager_factory.pysrc/aiogram_dialog/setup.py
3441ab9 to
4ec8bef
Compare
Summary by CodeRabbit
New Features
Documentation