Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#337 Type change of ivar in subclass is not visible

v3.0
open
Edward Loper
other (40)
5
2011-01-07
2011-01-07
Anonymous
No

Hi,

Using epydoc version 3.0.1, I found an issue with the type and description of instance variables.

I have two classes, L{A} and L{B}, with L{B} a subclass of L{A}. In the full project there is a lot more functionality, this is just a minimal example to show the issue. As a little background, both classes represent satellite instruments, L{A} uses a single dimension to store its data, L{B} uses a 2D structure. This means that the index goes from a single number to a 2-element list.

Class L{A} documents the C{index} instance variable as an C{int}. Class L{B} documents the C{index} instance variable as C{[int, int]}.

Epydoc gives them all a type of C{int}. I expected to see I{type = C{[int, int]}} for class B.

I called epydoc with epydoc -o doctest -v --pdf --docformat=epytext --name=doctest --graph=all doctest.py on the attached file. html shows the same result.

Discussion


  • Anonymous
    2011-01-07

    Short test file to show the issue.

     
    Attachments

  • Anonymous
    2011-01-07

    • labels: 469722 --> other
     

  • Anonymous
    2011-01-07

    In addition: if a base class raises NotImplementedError (and I document this), then the @raise NotImplementedError crops up in the documentation of the subclass. I did not find a way to suppress this. The whole point of this raise is that it can be overridden in a subclass, but epydoc does not see things this way.