sphinx-automodapi
sphinx-automodapi copied to clipboard
automodapi inheritance diagram self-looping arrow
Most people probably won't encounter this but it does happen when you have a subclass that shares the same name as its parent class. Example:
from astropy.modeling import models as _models
class Box1D(_models.Box1D):
"""Extends the original Box1D with some special magic."""
pass
The resultant inheritance diagram using automodapi makes a loop of the class on itself. It is harmless but appears quite funny and potentially confusing. I don't even know if a fix is possible or necessary. Just want to point it out.

Oh interesting... I'm not sure this can be fixed exactly the way you might expect, because the underlying diagram code uses graphviz, which keys on names.
Before I try to fix, if there isn't a way to have them show the same name, what do you think would make sense @pllim ? Maybe something like Box1D (#2)?
GitHub has spoiled the # for me as I associate it with issue number now. I am not sure what would be a less confusing representation. Box1D (2) (without the # maybe) might just be as good as any?
Or maybe just leave it as Box1D -> Box1D? Since when you mouse over, you will get more info about where the class is coming from anyway, right?
@pllim - don't think your second option here is possible because of the origin of ths issue (that graphviz keys on names.) But it might be that "Box1D" and "Box1D " (note the space in the second one) are considered different? That will acheive a very similar appearence, at least...
@eteq , sure, I'm not picky on this.