[Docs] Fix hf discussions info options that do not exist - #4886
Open
rishabhsai wants to merge 1 commit into
Open
[Docs] Fix hf discussions info options that do not exist#4886rishabhsai wants to merge 1 commit into
rishabhsai wants to merge 1 commit into
Conversation
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.
Summary
docs/source/en/guides/cli.mddocuments--commentsand--diffonhf discussions info, but neither exists. The command only takes--type/--repo-typeand--token(src/huggingface_hub/cli/discussions.py:154), so copying either line straight out of the guide exits with code 2.docs/source/en/guides/community.mdcarried the same--commentsexample in its bash block.--commentsline was also wrong about the default.discussion_infoprints the wholeget_discussion_detailsobject, so the conversation events are already in the output and there is nothing to opt into. The PR diff has its own subcommand,hf discussions diff, already documented a few sections down, so the guide now points there instead.--no-coloris not a flag anywhere in the CLI either. Colour suppression reads theNO_COLORenvironment variable (src/huggingface_hub/utils/_terminal.py:102, see https://no-color.org/), so that sentence now saysNO_COLOR=1.What the guide tells you to run today:
And the events are there without asking for them:
#3899 fixed a neighbouring batch of stale examples in the same two guides, so this is the same lane rather than a duplicate of it.
Checked with a script that parses every
hf ...line indocs/source/en/**.mdand validates it against the live click command tree: the discussions hits are gone, the 5 remaining hits are pre-existing false positives (shell pipes and flags inside quoted--container-argsvalues).grep -n 'no-color\|--comments\|--diff'over both guides is empty, andmake style(no regenerated file changed) thenmake qualityare clean.Note
Low Risk
Documentation-only changes; no runtime or API behavior is modified.
Overview
Updates the CLI and community guides so
hf discussions infoexamples match the real command surface.hf discussions infono longer documents nonexistent--commentsor--diffflags. The text now states that metadata and conversation events are included by default, and directs readers tohf discussions difffor PR diffs. The community guide example drops--commentsfrom the sample command.Color suppression is documented as
NO_COLOR=1instead of a--no-colorflag that the CLI does not expose.Reviewed by Cursor Bugbot for commit fad5350. Bugbot is set up for automated code reviews on this repo. Configure here.