-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add default value to progress_bar option #11024
base: main
Are you sure you want to change the base?
Conversation
help="Specify whether the progress bar should be used [on, off] (default: on)", | ||
choices=["auto", "on", "off"], | ||
default="auto", | ||
help="Specify whether the progress bar should be used [on, off] (default: auto)", |
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.
We should probably mention what auto means
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.
auto=on
on = force on?
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.
I’m thinking auto = inferred from -q; on = force on.
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.
Idk how to document it properly.
@@ -17,15 +23,17 @@ | |||
from pip._internal.utils.logging import get_indentation | |||
|
|||
DownloadProgressRenderer = Callable[[Iterable[bytes]], Iterator[bytes]] | |||
RichBarType = Literal["auto", "on"] | |||
BarType = Union[RichBarType, Literal["off"]] |
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.
Not really related to this change, but making BarType an enum would make validation much easier.
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.
but it would be tricky to use enum for argparse/optparse
#10930 (comment)