簡體   English   中英

如何讓Sphinx忽略我的文檔字符串中的GPL通知?

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

我正在使用Sphinx來記錄我的Python包。 當我在我的模塊上使用automodule指令時:

.. automodule:: mymodule
:members:

它會打印包括文檔字符串中的GPL通知在內的所有內容。 有沒有辦法告訴Sphinx忽略docstring / GPL還是應該把它留在文檔中?

我剛剛遇到了同樣的問題並通過將許可證通知移出文檔字符串並進入文件頂部的常規注釋塊來修復它。

例如:

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

""" This is the module docstring.

Description of the module here.

Etc, etc.

"""

import ....
...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM