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

Implement aliases #83

Merged
merged 5 commits into from
Oct 31, 2023
Merged

Implement aliases #83

merged 5 commits into from
Oct 31, 2023

Conversation

brentyi
Copy link
Owner

@brentyi brentyi commented Oct 31, 2023

Usage:

long_argument: Annotated[str, tyro.conf.arg(aliases=["-l", "--shorter"])]

Closes #54!

@brentyi brentyi enabled auto-merge (squash) October 31, 2023 19:29
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5907cd3) 99.22% compared to head (588423e) 99.22%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #83   +/-   ##
=======================================
  Coverage   99.22%   99.22%           
=======================================
  Files          24       24           
  Lines        2061     2067    +6     
=======================================
+ Hits         2045     2051    +6     
  Misses         16       16           
Flag Coverage Δ
unittests 99.22% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
tyro/_arguments.py 100.00% <100.00%> (ø)
tyro/_fields.py 99.67% <100.00%> (+<0.01%) ⬆️
tyro/conf/_confstruct.py 100.00% <100.00%> (ø)

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

@brentyi brentyi merged commit f548625 into main Oct 31, 2023
@brentyi brentyi deleted the brent/aliases branch October 31, 2023 19:40
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.

How to specify an alias for a parameter
1 participant