Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-131178: Update help message fortimeit CLI#131326

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 3 commits intopython:mainfromdonBarbos:issue-131178-timeit
Mar 30, 2025

Conversation

donBarbos
Copy link
Contributor

@donBarbosdonBarbos commentedMar 16, 2025
edited by bedevere-appbot
Loading

I thought it was weird to have next end for the help message. The one who added test case also noticed this and commented it.
I didn't find where it could be useful and also unexpectedly, this is what it looks like when I run./python -m timeit -h:

main branchPR branch
Screenshot from 2025-03-16 15-39-11Screenshot from 2025-03-16 15-38-56

@picnixz
Copy link
Member

Is the% part of the output or is it your terminal emulator? I think it's fine to have an empty line at the end so that it's a bit easier to read but I don't have a strong opinion on it though.

Copy link
Contributor

@StanFromIrelandStanFromIreland left a comment

Choose a reason for hiding this comment

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

I wasn't sure if this was correct, so I checked some GNU help pages. Conclusion -- it seems to be.

I did however like the handy link to the online docs.

$ cat --help...GNU coreutils online help: <https://www.gnu.org/software/coreutils/>Full documentation <https://www.gnu.org/software/coreutils/cat>or available locally via: info '(coreutils) cat invocation'

@donBarbos
Copy link
ContributorAuthor

donBarbos commentedMar 16, 2025
edited
Loading

% appears if you setend=' ' as an argument to theprint function (by defaultend='\n' but I changed toend='')

and the first empty line appears as it is intimeit.__doc__ (I removed it from doc string)

@picnixz
Copy link
Member

What I meant is that on your second screenshot:

image

There is no newline between the end of the help and the prompt. I think we need a new line, as we currently have (but without%)

@donBarbos
Copy link
ContributorAuthor

got it. we can either removeend argument or leave empty line at the end of__doc__

@hugovk
Copy link
Member

Yeah, I can repro the percent onmain (last alpha shown here):

image

argparse CLI help has a single blank line at the end:

image

And with this PR we get two blank lines:

image

If we remove this newline (that is, revertda4d71f) we get a single blank line:

image

Please can you revertda4d71f? Thanks!

donBarbos reacted with thumbs up emoji

@donBarbos
Copy link
ContributorAuthor

argparse doesn't have empty lines. I think you have one empty line because of your environment theme (line with a blue triangle).
Screenshot from 2025-03-28 21-08-35

currently formain branch we get two empty lines fortimeit I suggested removing both but@picnixz suggested leaving one so I put one back.

but i can remove the second one again

@hugovkhugovk merged commit55150a7 intopython:mainMar 30, 2025
38 checks passed
@hugovk
Copy link
Member

Thanks!

seehwan pushed a commit to seehwan/cpython that referenced this pull requestApr 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@StanFromIrelandStanFromIrelandStanFromIreland left review comments

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@donBarbos@picnixz@hugovk@StanFromIreland

[8]ページ先頭

©2009-2025 Movatter.jp