Skip to content

Commit

Permalink
DOC: Add simple automodule
Browse files Browse the repository at this point in the history
  • Loading branch information
bskinn committed Jun 4, 2019
1 parent 6087115 commit 43ac94c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
5 changes: 4 additions & 1 deletion doc/source/conf.py
Expand Up @@ -28,6 +28,9 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx_tabs.tabs",
]

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -44,7 +47,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
7 changes: 5 additions & 2 deletions doc/source/index.rst
Expand Up @@ -6,9 +6,12 @@
Welcome to tabslash's documentation!
====================================

.. automodule:: tabslash.tabslash
:members:

.. toctree::
:maxdepth: 2
:caption: Contents:
:maxdepth: 2
:caption: Contents:



Expand Down
2 changes: 1 addition & 1 deletion src/tabslash/__init__.py
@@ -1,2 +1,2 @@
from tabslash.tabslash import foo
from version import __version__
from tabslash.version import __version__
8 changes: 8 additions & 0 deletions src/tabslash/tabslash.py
Expand Up @@ -4,3 +4,11 @@ def foo(a, b, /):
"""Calculate a thing on two arguments, currently the sum."""
return a + b

def bar(a, /, b, *, c=1):
"""Calculate c * (a ** b), with c defaulting to one.
`a` is positional-only, `b` is general,
`c` is keyword-only.
"""
return c * (a ** b)

0 comments on commit 43ac94c

Please sign in to comment.