-
Notifications
You must be signed in to change notification settings - Fork 25
cli: debug optional args #420
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
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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 adds comprehensive test coverage for the CLI functionality and fixes argument parsing to support both positional and optional argument styles. The changes ensure that CLI commands can be invoked with either style consistently.
- Adds parametrized tests to verify both positional and optional argument parsing for all CLI commands
- Modifies the CLI configuration to disable positional-only parsing by setting
as_positional=False - Improves test structure with helper methods for building commands and creating test files
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/unittests/cli/test_command_line.py | Adds comprehensive test suite with parametrized tests for both positional and optional argument styles |
| src/lightning_utilities/cli/main.py | Updates CLI configuration to support optional arguments by setting as_positional=False |
Co-authored-by: Copilot <[email protected]>
Before submitting
What does this PR do?
Adding tests and fixing #371
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.
📚 Documentation preview 📚: https://lit-utilities--420.org.readthedocs.build/en/420/