overriding an @ivar with a method in a subclass causes an exception during HTML formatting

Bug #309310 reported by Glyph Lefkowitz
2
Affects Status Importance Assigned to Milestone
epydoc (Ubuntu)
New
Undecided
Unassigned

Bug Description

Here's an example Python source file:

glyph@nhuvasarim:~$ cat a.py

class Superclass(object):
    """
    A superclass.

    @ivar value: a value that I provide.
    """

class Subclass(Superclass):
    """
    A subclass.
    """

    def value(self):
        """
        A method that I override L{Superclass.value} with.
        """

Running 'epydoc' over this file makes the problem rather obvious:

$ epydoc -vvvv --simple-term --debug a
  .
  .
  .
[ 78%] a.Subclass-class.html
Exception in template write_function_details_entry() on line 100:
            var_doc.overrides.value.docstring not in (None, UNKNOWN)):
Traceback (most recent call last):
  File "/usr/bin/epydoc", line 13, in <module>
    cli()
  File "/var/lib/python-support/python2.5/epydoc/cli.py", line 946, in cli
    main(options, names)
  File "/var/lib/python-support/python2.5/epydoc/cli.py", line 764, in main
    write_html(docindex, options)
  File "/var/lib/python-support/python2.5/epydoc/cli.py", line 804, in write_html
    html_writer.write(options.target)
  File "/var/lib/python-support/python2.5/epydoc/docwriter/html.py", line 630, in write
    self._write(self.write_class, directory, filename, doc)
  File "/var/lib/python-support/python2.5/epydoc/docwriter/html.py", line 700, in _write
    write_func(f.write, *args)
  File "/var/lib/python-support/python2.5/epydoc/docwriter/html.py", line 896, in write_class
    self.write_details_list(out, "Method Details", doc, "method")
  File "/var/lib/python-support/python2.5/epydoc/docwriter/html.py", line 2152, in write_details_list
    self.write_details_entry(out, var_doc)
  File "/var/lib/python-support/python2.5/epydoc/docwriter/html.py", line 2177, in write_details_entry
    div_class)
  File "<string>", line 100, in write_function_details_entry
  File "/var/lib/python-support/python2.5/epydoc/docwriter/html.py", line 3174, in href
    assert isinstance(target, (APIDoc, DottedName))
AssertionError

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.