Skip to content

gh-146609: Use argparse for colour help timeit CLI#149334

Open
hugovk wants to merge 2 commits intopython:mainfrom
hugovk:3.15-timeit-argparse
Open

gh-146609: Use argparse for colour help timeit CLI#149334
hugovk wants to merge 2 commits intopython:mainfrom
hugovk:3.15-timeit-argparse

Conversation

@hugovk
Copy link
Copy Markdown
Member

@hugovk hugovk commented May 3, 2026

Followup to #146610.

Before After
image image

This not only gives us colour help, which is more readable, it improves validation.

We also don't need to show the class info in CLI help.

@hugovk hugovk added the stdlib Standard Library Python modules in the Lib/ directory label May 3, 2026
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

A few little suggestions.

Comment thread Lib/timeit.py Outdated
Comment thread Misc/NEWS.d/next/Library/2026-05-03-23-47-59.gh-issue-146609.V9jqYf.rst Outdated
Comment thread Lib/timeit.py
Comment thread Lib/timeit.py Outdated
Comment thread Lib/timeit.py Outdated
Comment thread Lib/timeit.py
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@hugovk hugovk enabled auto-merge (squash) May 4, 2026 08:17
@hugovk
Copy link
Copy Markdown
Member Author

hugovk commented May 4, 2026

Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge stdlib Standard Library Python modules in the Lib/ directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants