From 84f914eac7bfa9ebd85b3fcc92c324ee384058ef Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 15 Mar 2017 00:32:57 -0400 Subject: [PATCH] Demodocs: move version info into python module --- demo_docs/source/index.rst | 7 ------- demo_docs/source/test_py_module/test.py | 8 +++++++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/demo_docs/source/index.rst b/demo_docs/source/index.rst index 6d866400..5a9080c3 100644 --- a/demo_docs/source/index.rst +++ b/demo_docs/source/index.rst @@ -331,13 +331,6 @@ Data Some data link :data:`Data_item_1`. -.. versionadded:: 1.0 - This was added in 1.0 -.. versionchanged:: 2.0 - This was changed in 2.0 -.. deprecated:: 3.0 - This is deprecated since 3.0 - Download links ============== diff --git a/demo_docs/source/test_py_module/test.py b/demo_docs/source/test_py_module/test.py index 317c3dbf..f47b9840 100644 --- a/demo_docs/source/test_py_module/test.py +++ b/demo_docs/source/test_py_module/test.py @@ -4,7 +4,7 @@ class Foo: - r"""Docstring for class Foo. + """Docstring for class Foo. This text tests for the formatting of docstrings generated from output ``sphinx.ext.autodoc``. Which contain reST, but sphinx nests it in the @@ -103,5 +103,11 @@ class Foo: :raises ValueError: When ``a`` is not an integer. + .. versionadded:: 1.0 + This was added in 1.0 + .. versionchanged:: 2.0 + This was changed in 2.0 + .. deprecated:: 3.0 + This is deprecated since 3.0 """ return sum(kwargs.values()) / len(kwargs), a + b