Skip to content

Conversation

jrhe
Copy link

@jrhe jrhe commented Jul 24, 2024

Autodoc calls mro on the target class triggering __getattribute__(). This could throw an exception breaking the build of documentation, such as when building the documentation for transformers on Mac OS: transformers/issues/32203.

This PR fixes this issue by using mro cached in __mro__ instead of mro(). This shouldn't be a breaking change from what I understand of mro() and __mro__ but I'm not 100% confident.

@stevhliu
Copy link
Member

Thanks, pinging @mishig25 for a review 🙂

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