Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Sphinx to ignore the GPL notice in my docstring?

I'm using Sphinx to document my Python package. When I use the automodule directive on my module:

.. automodule:: mymodule
:members:

It prints everything including the GPL notice in the docstring. Is there any way to tell Sphinx to ignore the docstring/GPL or should I leave it included in the documentation?

like image 244
tompreston Avatar asked Jun 20 '13 09:06

tompreston


1 Answers

I ran into the same problem just now and fixed it by moving the license notice out of the docstring and into a regular comment block at the top of the file.

For example:

# Copyright 2013 Example, inc.  All rights reserved.
#
# License ...
# ...
# ...

""" This is the module docstring.

Description of the module here.

Etc, etc.

"""

import ....
...
like image 200
David Pursehouse Avatar answered Nov 04 '22 01:11

David Pursehouse