Skip to content
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

Unfreeze help_flags and version_flags; create/delete commands on set/get #127

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

BrianPugh
Copy link
Owner

@BrianPugh BrianPugh commented Mar 10, 2024

@PythonNinja this should fix #126 . I'll add more specific instructions in that issue.

This PR does the following:

  1. Unfreezes the help_flags and version_flags attributes.
  2. Creates/deletes the corresponding commands on set/del.
  3. The meta app's default help_flags and version_flags now come from its parent.

@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 96.17%. Comparing base (f95622b) to head (e90f870).

Files Patch % Lines
cyclopts/core.py 88.88% 1 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
- Coverage   96.30%   96.17%   -0.13%     
==========================================
  Files          16       16              
  Lines        1757     1780      +23     
  Branches      443      451       +8     
==========================================
+ Hits         1692     1712      +20     
- Misses         30       31       +1     
- Partials       35       37       +2     
Flag Coverage Δ
unittests 96.01% <88.88%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BrianPugh
Copy link
Owner Author

There's an independent issue (but also experienced by your example) where:

python my_script.py --verbose foo --help

erroneously displays the "root" help page instead of the help page for the foo command. I'll see if I can quickly tackle that in another PR.

@BrianPugh BrianPugh merged commit cdbb28d into main Mar 10, 2024
15 checks passed
@BrianPugh BrianPugh deleted the unfreeze-flags branch March 10, 2024 18:57
@pythoninja
Copy link

There's an independent issue (but also experienced by your example) where:

python my_script.py --verbose foo --help

erroneously displays the "root" help page instead of the help page for the foo command. I'll see if I can quickly tackle that in another PR.

Yes, thank you for quick fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of the meta application results in a double help display
3 participants