Skip to content
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

More error message tweaks #67

Merged
merged 5 commits into from
Sep 6, 2023
Merged

More error message tweaks #67

merged 5 commits into from
Sep 6, 2023

Conversation

brentyi
Copy link
Owner

@brentyi brentyi commented Sep 4, 2023

Based on suggestions in #63.

The main changes are:

  • Added helptext for missing required arguments in error messages.
  • Dropped the automatic helptext print when a script with required arguments is run without any arguments.
  • Dropped the usage message entirely from error messages.

Would like to think more about the ramifications of the second and third changes before merging, though they're probably okay!

Some examples:

image
image

cc @vwxyzjn

@codecov
Copy link

codecov bot commented Sep 4, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (5498eec) 99.13% compared to head (d3b6791) 99.13%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #67   +/-   ##
=======================================
  Coverage   99.13%   99.13%           
=======================================
  Files          23       23           
  Lines        1956     1975   +19     
=======================================
+ Hits         1939     1958   +19     
  Misses         17       17           
Flag Coverage Δ
unittests 99.13% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
tyro/_cli.py 100.00% <ø> (ø)
tyro/_argparse_formatter.py 97.23% <100.00%> (+0.20%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vwxyzjn
Copy link
Contributor

vwxyzjn commented Sep 5, 2023

LGTM!

@brentyi brentyi enabled auto-merge (squash) September 6, 2023 06:48
@brentyi brentyi merged commit 4d5f058 into main Sep 6, 2023
10 checks passed
@brentyi brentyi deleted the brent/error_tweaks branch September 6, 2023 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants