Menu

#337 Type change of ivar in subclass is not visible

v3.0
open
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

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.