-
Notifications
You must be signed in to change notification settings - Fork 14
Support injection for generators. #187
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR resolves #186 by adding support for dependency injection into generator functions (both synchronous and asynchronous) and by enhancing error handling for context resources. Key changes include:
- Adding specialized injector functions for sync and async generators in injection.py.
- Expanding tests to cover various generator injection scenarios and error conditions.
- Updating documentation and navigation to reflect the new generator injection support.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
that_depends/injection.py | Introduces ContextProviderError and new injection paths for generator functions. |
tests/test_injection.py | Adds new tests for sync/async generator injection and context resource error handling. |
mkdocs.yml | Updates navigation by adding generator injection docs and rearranging duplicate entries. |
docs/introduction/generator-injection.md | Provides detailed documentation on using dependency injection with generators. |
docs/integrations/fastapi.md | Minor grammar adjustment in FastAPI integration documentation. |
docs/introduction/application-settings.md | Removes outdated application settings doc. |
Resolves #186