mkdocstrings / pytkdocs

Load Python objects documentation.
https://mkdocstrings.github.io/pytkdocs
ISC License
50 stars 32 forks source link

fix: Avoid recursion if a class has a reference to itself. #76

Closed matthewwardrop closed 3 years ago

matthewwardrop commented 3 years ago

I was attempting to use mkdocstrings with some Python library I maintain, only to find it failed because one of the classes referred to itself in one of its members. I'm not sure if this fix is ideal (since it omits the member entirely rather than including it but making it clear that there is a self-reference involved; and it doesn't deal with with non-local recursion).

What are your thoughts?

pawamoy commented 3 years ago

I think this fix is good enough for now. It's getting harder and harder to get the logic right. I must work on a refactor that takes all this cases into account, or at least make it easy to fix things like this when they hit.

matthewwardrop commented 3 years ago

Thanks @pawamoy ! And yeah, these projects often have a way of outgrowing themselves... But great work so far!

pawamoy commented 3 years ago

You put my mind at ease a bit, thank you so much :sweat_smile: