sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
Other
64 stars 45 forks source link

fix bug #248

Open Fabian-Geyer opened 4 months ago

Fabian-Geyer commented 4 months ago

Fixed Bug

AttributeError: 'NoneType' object has no attribute 'attrs'

when using :members: for sophisticated class

joeced commented 4 months ago

Thanks for the contribution. Can you show me a case, where you get this error?

Fabian-Geyer commented 4 months ago

The problem arises in Casos in the following folder: https://github.com/iFR-ACSO/casos/tree/main/%2Bcasos/%40PS for the PS class. Thanks for the quick reply and the support.

joeced commented 4 months ago

Phew... I finally had time to debug the issue. Your fix is not correct, the bug is even more subtle. In the PS class your have inferior classes in package, the casadi.DM method for instance.

In line 141 of mat_documenters.py we would incorrectly lookup the method casadi. I fixed that, but the rendering is still off. We don't handle dotted member names correctly... yet :)

billede

Fabian-Geyer commented 3 months ago

I'm very impressed! Thanks for the great work

joeced commented 3 months ago

Hi again. Sorry for the late response. I'm struggling a bit on creating a simple example with inferior classes as the PS.m class.