Closed grauvictor closed 9 months ago
Hi, thanks for filing this issue and the fix suggestion!
Are you able to share a runnable example for reproducing the error? The fix seems reasonable, but I'm not fully following the root cause of the problem (particularly in what situation the cls
value gets set to a metaclass) and it'd be nice to include this case in the unit tests.
I get the following error:
Du to the following line: https://github.com/brentyi/tyro/blob/152b889ef293aaa03f74843b378d1a37bd630700/tyro/_docstrings.py#L120
Called on the following type:
<class 'pydantic.v1.main.ModelMetaclass'>
Suggestion: Replace https://github.com/brentyi/tyro/blob/152b889ef293aaa03f74843b378d1a37bd630700/tyro/_docstrings.py#L120 by:
classes_to_search = cls.__mro__