Closed KolinGuo closed 2 weeks ago
Hi @KolinGuo, thanks for the issue report!
I did some digging and it seems like this is because of a bug in Python<=3.10: https://github.com/python/cpython/issues/90353 https://github.com/python/typing_extensions/issues/310 https://github.com/python/typing_extensions/pull/312
It's not ideal but I added a workaround in #157, as well as test cases based on the snippet you provided. This will be fixed in the next release.
This should be fixed in tyro>=0.8.9
!
Thank you @brentyi for fixing it so promptly! I've verified that it's working now.
It seemed like
Optional[str]
argument withNone
as its default value breaks the specified argument alias. See the minimal example below where the--vid
alias forvendor_id
fails to be recognized while the--pid
alias forproduct-id
works.