epydoc help (putting XML in docstrings)

P

programmer.py

Hi everyone! I'm documenting some functions that return XML strings.
I'd like to have `sample' xml show up in my epydoc generated
documentation. However, epydoc does not like the indentation of the
XML and gives me this error ->

L28: Error: Improper paragraph indentation.

Here is a simple function that epydoc does not like:

def test():
"""
Return an XML string that looks like this::

<TRANSACTION>
<ID>123</ID>
<STATUS>D</STATUS>
...
</TRANSACTION>

@return: XML string.
"""
pass

[jwyant@L-JWYANT:daplib]$ epydoc test.py
Importing 1 modules.
[.]
Building API documentation for 1 modules.
[.]
===========================================================================
C:\cygwin\home\jwyant\code\dap-support\python\daplib\test.py
In test.test docstring (line 2):
---------------------------------------------------------------------------
L5: Error: Improper paragraph indentation.

Any ideas?

Thanks!
 
J

James Stroud

Hi everyone! I'm documenting some functions that return XML strings.
I'd like to have `sample' xml show up in my epydoc generated
documentation. However, epydoc does not like the indentation of the
XML and gives me this error ->

L28: Error: Improper paragraph indentation.

Here is a simple function that epydoc does not like:

def test():
"""
Return an XML string that looks like this::

<TRANSACTION>
<ID>123</ID>
<STATUS>D</STATUS>
...
</TRANSACTION>

@return: XML string.
"""
pass

[jwyant@L-JWYANT:daplib]$ epydoc test.py
Importing 1 modules.
[.]
Building API documentation for 1 modules.
[.]
===========================================================================
C:\cygwin\home\jwyant\code\dap-support\python\daplib\test.py
In test.test docstring (line 2):
---------------------------------------------------------------------------
L5: Error: Improper paragraph indentation.

Any ideas?

Thanks!

Just indent the xml:

def test():
"""
Return an XML string that looks like this::

<TRANSACTION>
<ID>123</ID>
<STATUS>D</STATUS>
...
</TRANSACTION>

@return: XML string.
"""
pass

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top