-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add pre-commit hooks #73
Conversation
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
WalkthroughWalkthroughThe recent changes introduce a new pre-commit hook configuration for Changes
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (5)
Files skipped from review due to trivial changes (4)
Additional context usedGitHub Check: codecov/patch
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #73 +/- ##
=======================================
Coverage 78.49% 78.49%
=======================================
Files 9 9
Lines 758 758
=======================================
Hits 595 595
Misses 163 163 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
This reverts commit c675ac7.
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: 1
@@ -90,7 +90,7 @@ | |||
dict | |||
normalized data | |||
""" | |||
module_name, attr_name = func.rsplit(".", 1) | |||
module_name, attr_name = func.strip().rsplit(".", 1) |
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.
LGTM! Consider adding tests for the new functionality.
The addition of strip()
ensures that any leading or trailing whitespace in the func
string is removed before splitting it to derive module_name
and attr_name
. This is a useful change to prevent potential errors due to extra whitespace.
However, the new line is not covered by tests.
Do you want me to generate the unit testing code or open a GitHub issue to track this task?
Tools
GitHub Check: codecov/patch
[warning] 93-93: dargs/cli.py#L93
Added line #L93 was not covered by tests
Close. I can't find a workaround for pre-commit/pre-commit#2610. |
Summary by CodeRabbit
New Features
Documentation
pre-commit.md
file for detailed guidance.Bug Fixes
check_cli
command.