-
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix in pre-commit #17
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
Reviewer's GuideThis PR modifies the docstring checker to require explicit path configuration by default (adding an early exit and message when no paths are specified), extends test coverage for both no-path and configured-path scenarios, updates pre-commit hook documentation and dependency versions, and bumps the project version. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 refactors the configuration for the docstring checker and updates pre-commit hook instructions to ensure users explicitly specify paths. Key changes include:
- Changing the default "paths" configuration to empty and adding a check with an exit message when no paths are provided.
- Adding tests to verify behavior when no paths are specified and when specific paths are configured.
- Bumping versions and updating configuration instructions in pyproject.toml and pre-commit hook files.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/check_docstrings.py | Updated default configuration and added an early exit with an explanatory message if no paths are specified. |
| tests/test_docstring_checker/test_check_docstrings.py | Added tests for scenarios with no specified paths and with configured paths. |
| pyproject.toml | Incremented version from "0.0.7" to "0.0.8". |
| .pre-commit-hooks.yaml | Updated documentation to emphasize the configuration requirement for paths. |
| .pre-commit-config.yaml | Updated dependency versions for pyproject-fmt and ruff. |
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.
Hey @ternaus - I've reviewed your changes - here's some feedback:
- Changing the default paths from ['.'] to [] is a breaking change—consider preserving backward compatibility or at least issuing a deprecation warning or bumping the major version.
- Printing the ‘No paths specified for checking…’ message to stdout can be confused with normal output; consider logging to stderr or shortening the message for clarity.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Introduce explicit path configuration for the docstring checker, update default behavior to skip scanning when no paths are provided, add corresponding tests, clarify pre-commit documentation, and bump related tool and project versions.
Enhancements:
CI:
Documentation:
Tests:
Chores: