Sphinx Theme Demo 0.1.0 documentation

Sweet Docs

This is an incredibly long caption for a long menu

This Page

test_py_module

Test Module for sphinx_rtd_theme.

class test_py_module.test.Foo(qux, spam=False)[source]

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 <dl>, and <dt> tags. Also, <tt> is used for class, method names and etc, but those will always have the .descname or .descclassname class.

Normal <tt> (like the <tt> I just wrote here) needs to be shown with the same style as anything else with ``this type of markup``.

It’s common for programmers to give a code example inside of their docstring:

from test_py_module import Foo

myclass = Foo()
myclass.dothismethod('with this argument')
myclass.flush()

print(myclass)

Here is a link to capitalize(). Here is a link to __init__().

__init__(qux, spam=False)[source]

Start the Foo.

Parameters
  • qux (string) – The first argument to initialize class.

  • spam (bool) – Spam me yes or no…

__weakref__

list of weak references to the object (if defined)

add(val1, val2)[source]

Return the added values.

Parameters
  • val1 (int) – First number to add.

  • val2 (int) – Second number to add.

Return type

int

another_function(a, b, **kwargs)[source]

Here is another function.

Parameters
  • a (int) – The number of green hats you own.

  • b (int) – The number of non-green hats you own.

  • kwargs (float) – Additional keyword arguments. Each keyword parameter should specify the name of your favorite cuisine. The values should be floats, specifying the mean price of your favorite dish in that cooking style.

Returns

A 2-tuple. The first element is the mean price of all dishes across cuisines. The second element is the total number of hats you own: \(a + b\).

Return type

tuple

Raises

ValueError – When a is not an integer.

bar = 1

Doc comment for class attribute Foo.bar. It can have multiple lines.

baz = 2

Docstring for class attribute Foo.baz.

capitalize(myvalue)[source]

Return a string as uppercase.

Parameters

myvalue (string) – String to change

Return type

string

flox = 1.5

Doc comment for Foo.flox. One line only.

qux

Doc comment for instance attribute qux.

spam

Docstring for instance attribute spam.