fix: correct truncated help text for schema load/check commands - #1240
Open
qduk wants to merge 2 commits into
Open
fix: correct truncated help text for schema load/check commands#1240qduk wants to merge 2 commits into
qduk wants to merge 2 commits into
Conversation
added 2 commits
August 11, 2026 21:53
Click's default short-help truncates at 45 chars when no explicit short_help is set, cutting "load" and "check" mid-sentence in the `infrahubctl schema` command list. Set explicit short_help strings so the generated docs read as complete sentences.
Deploying infrahub-sdk-python with
|
| Latest commit: |
402c255
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0d06b7fb.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://fix-schema-cli-short-help.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## stable #1240 +/- ##
==========================================
- Coverage 83.37% 82.54% -0.84%
==========================================
Files 141 138 -3
Lines 13577 12186 -1391
Branches 2195 1833 -362
==========================================
- Hits 11320 10059 -1261
+ Misses 1642 1568 -74
+ Partials 615 559 -56
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
qduk
marked this pull request as ready for review
August 12, 2026 07:18
gmazoyer
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
infrahubctl schemacommand list truncated theloadandcheckdescriptions mid-sentence ("Load one or multiple schema files into...",
"Check if schema files are valid and what..."). This came from Click's
default short-help generation, which truncates the first line of a
command's docstring at 45 characters when no explicit
short_helpisset — both docstrings exceed that limit.
What changed
short_helpstrings on theschema loadandschema checkTyper commands in
infrahub_sdk/ctl/schema.pyso Click no longer fallsback to its 45-character auto-truncation.
docs/docs/infrahubctl/infrahubctl-schema.mdxviauv run invoke docs-generateto pick up the fix.What stayed the same: No other commands, options, or behavior changed —
this only affects the one-line summary shown in
--helpand the generateddocs.
How to review
infrahub_sdk/ctl/schema.py— the twoshort_help=additions.docs/docs/infrahubctl/infrahubctl-schema.mdx— regenerated, diff istwo lines.
How to test
Confirm the
loadandchecklines read as complete sentences.Impact & rollout
Checklist
docs-generate)Summary by cubic
Fix truncated help text for
infrahubctl schemaloadandcheckby adding explicitshort_help, so the CLI and generated docs show complete sentences. Regenerated schema docs; no behavior changes.Written for commit 402c255. Summary will update on new commits.