meson icon indicating copy to clipboard operation
meson copied to clipboard

Make --help output more consistent and narrower

Open keszybz opened this issue 3 years ago • 5 comments
trafficstars

keszybz avatar Jul 02 '22 15:07 keszybz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.80%. Comparing base (81d7c24) to head (9876acd). Report is 1750 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10556      +/-   ##
==========================================
+ Coverage   68.65%   68.80%   +0.15%     
==========================================
  Files         412      406       -6     
  Lines       87875    87954      +79     
  Branches    20730    19540    -1190     
==========================================
+ Hits        60327    60521     +194     
+ Misses      23041    22864     -177     
- Partials     4507     4569      +62     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 02 '22 15:07 codecov[bot]

Argparse doesn't use dots at the end, so some --help lines had a dot, and some didn't. So drop them everywhere for consistency.

Hmm, but why not add them everywhere for consistency? e.g. now you end up with some --help lines containing multiple sentences where only the first sentence has a dot.

eli-schwartz avatar Jul 03 '22 05:07 eli-schwartz

Argparse doesn't use dots at the end, so some --help lines had a dot, and some didn't. So drop them everywhere for consistency.

Hmm, but why not add them everywhere for consistency? e.g. now you end up with some --help lines containing multiple sentences where only the first sentence has a dot.

Two reasons: 1. there's an autogenerated messages for --help itself which use a dot and is provided implicitly by argparse. 2. the dots are not that useful here. They take up space and make the text *feel" longer. Help outputs like this are almost always without help. The few places where there are multiple sentences still read OK without the dot.

keszybz avatar Jul 03 '22 07:07 keszybz

there's an autogenerated messages for --help itself which use a dot and is provided implicitly by argparse.

But this:

-h, --help                               show this help message and exit

also refrains from capitalizing the first word, while you went ahead and capitalized all the manually defined option entries, so the autogenerated --help is still inconsistent. So I don't see the problem with making this one autogenerated message be inconsistent about the dot as well.

eli-schwartz avatar Jul 03 '22 11:07 eli-schwartz

Yes, that's true. But consistency is just one of the reasons. The other reason is that it's just better to not have the dots, as described above. Most --help outputs don't.

keszybz avatar Jul 03 '22 22:07 keszybz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.80%. Comparing base (81d7c24) to head (9876acd). Report is 1875 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10556      +/-   ##
==========================================
+ Coverage   68.65%   68.80%   +0.15%     
==========================================
  Files         412      406       -6     
  Lines       87875    87954      +79     
  Branches    20730    19540    -1190     
==========================================
+ Hits        60327    60521     +194     
+ Misses      23041    22864     -177     
- Partials     4507     4569      +62     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Sep 21 '24 21:09 codecov-commenter