-
Notifications
You must be signed in to change notification settings - Fork 21
Add return type to get_errors method #1214
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 return type to get_errors method #1214
Conversation
WalkthroughAdds a return type annotation to get_errors in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
✨ Finishing Touches
🧪 Generate unit tests
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/stratis_cli/_error_reporting.py (2)
20-20: Prefer collections.abc.Iterator if Python ≥ 3.9Minor style nit: using collections.abc aligns with modern typing guidance and avoids typing re-exports.
If our minimum supported Python is ≥ 3.9, apply:
-from typing import Iterator +from collections.abc import Iterator
83-92: LGTM; add docstring return/param for consistencyType annotation is correct. Consider documenting returns/param like other functions in this module.
def get_errors(exc: BaseException) -> Iterator[BaseException]: """ Generates a sequence of exceptions starting with exc and following the chain of causes. + :param BaseException exc: the head of the error chain + :returns: iterator over exc and its __cause__ chain + :rtype: Iterator[BaseException] """
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/stratis_cli/_error_reporting.py(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: coverage-runs
f94944b to
4e27f9b
Compare
Signed-off-by: mulhern <amulhern@redhat.com>
Related #1207
Summary by CodeRabbit