astropy / astropy/sphinx-automodapi

automodapi inheritance diagram self-looping arrow

Open
#59 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
67
Forks
48
Avg merge
11h 52m
Merged PRs (30d)
1

Description

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:

```python
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.

![untitled](https://cloud.githubusercontent.com/assets/2090236/21055528/b5a5831c-bdff-11e6-8308-85eaa6dd509f.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Box1D reproducer in the issue and trace how automodapi builds inheritance diagrams for classes sharing a name with a parent. Confirm the generated diagram contains a self-loop, then verify that the completed change removes that arrow without breaking other inheritance diagrams.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.