Browse Source

Add constant example

main
khr 2 years ago
parent
commit
e9fc2d8e02
  1. 5
      docs/simple.rst
  2. 3
      src/simple.py

5
docs/simple.rst

@ -8,8 +8,11 @@ It can include specific function docs here: @@ -8,8 +8,11 @@ It can include specific function docs here:
.. autofunction:: math.log
And here's the docs for our second module:
And here's the docs for our second module. We'll include ``undoc-members`` this
time:
.. automodule:: simple
:members:
:undoc-members:
And that's all she wrote.

3
src/simple.py

@ -1,8 +1,7 @@ @@ -1,8 +1,7 @@
__all__ = ["SIMPLE_CONST", "bar"]
SIMPLE_CONST = 2
SIMPLE_CONST = 2 #: The number 2
def bar(a, b):
"""Returns whether :a: and :b: have passed the bar exam in their state."""
return a + b > SIMPLE_CONST

Loading…
Cancel
Save