Closed kevinddchen closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
30803e8
) 99.58% compared to head (24cf573
) 99.58%. Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fixes #123.
An unintended side-effect of #118 introduced a regression that broke the
tyro.cli(description=...)
field for hierarchical configs. This was due to an extraneous setting of theargparse.ArgumentParser.description
field, which was causing the description to be set by the description of a leaf node in the tree.The description was initially set in the
.apply()
method here: https://github.com/brentyi/tyro/blob/30803e8a4ee871693f7b021be84265780ddc0146/src/tyro/_parsers.py#L201Later, there is a call into the
.apply_args()
method that sets the description again: https://github.com/brentyi/tyro/blob/30803e8a4ee871693f7b021be84265780ddc0146/src/tyro/_parsers.py#L241This is problematic after #118 because we now recurse into the
.apply_args()
method: https://github.com/brentyi/tyro/blob/30803e8a4ee871693f7b021be84265780ddc0146/src/tyro/_parsers.py#L291I have a strong feeling I am overlooking something. I will see if tests pass or not. I can also add a test if you want to check the description field.