Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR standardizes exception re-raising to preserve original tracebacks, streamlines DI registrations in the core message module, and bumps the UV setup action version.
- Replace
raise excwith bareraisein history and retry middlewares. - Simplify
@injection.singletoncalls by removing explicit targets and generic parameters incq/_core/message.py. - Upgrade
astral-sh/setup-uvaction to v6 in CI.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/helpers/history.py | Switched from raise exc to bare raise to keep full traceback. |
| cq/middlewares/retry.py | Removed capturing exception variable and use bare raise. |
| cq/_core/message.py | Consolidated @injection.singleton calls, removed generics/on=. |
| .github/actions/environment/action.yml | Updated astral-sh/setup-uv action version to v6. |
Comments suppressed due to low confidence (2)
cq/_core/message.py:36
- Removing the explicit
on=CommandBusparameter might alter the intended injection key; consider addingon=CommandBusto ensure the bus is registered correctly.
@injection.singleton(inject=False, mode="fallback")
cq/_core/message.py:48
- Without
on=QueryBus, the decorator may not register to the correct injection target; please specifyon=QueryBusto maintain consistency.
@injection.singleton(inject=False, mode="fallback")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ception