| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
There was a problem hiding this comment.
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'
Sorry, something went wrong.
|
% appears if you set end=' ' as an argument to the print function (by default end='\n' but I changed to end='') and the first empty line appears as it is in timeit.__doc__ (I removed it from doc string) |
Sorry, something went wrong.
|
What I meant is that on your second screenshot: 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 %) |
Sorry, something went wrong.
|
got it. we can either remove end argument or leave empty line at the end of __doc__ |
Sorry, something went wrong.
|
Yeah, I can repro the percent on main (last alpha shown here):
argparse CLI help has a single blank line at the end:
And with this PR we get two blank lines:
If we remove this newline (that is, revert da4d71f) we get a single blank line:
Please can you revert da4d71f? Thanks! |
Sorry, something went wrong.
|
argparse doesn't have empty lines. I think you have one empty line because of your environment theme (line with a blue triangle). currently for main branch we get two empty lines for timeit I suggested removing both but @picnixz suggested leaving one so I put one back. but i can remove the second one again |
Sorry, something went wrong.
This reverts commit da4d71f.
|
Thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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: