Skip to content

Commit

Permalink
Use sphinxcontrib-trio extension
Browse files Browse the repository at this point in the history
This adds some more capabilities to sphinx, like marking
functions as decorators or with contexts
  • Loading branch information
nicoddemus committed Mar 6, 2018
1 parent 6b4565f commit 6fa9768
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions doc/en/builtin.rst
Expand Up @@ -59,6 +59,8 @@ Fixtures and requests
To mark a fixture function:

.. autofunction:: _pytest.fixtures.fixture
:noindex:
:decorator:

Tutorial at :ref:`fixtures`.

Expand Down
11 changes: 6 additions & 5 deletions doc/en/conf.py
Expand Up @@ -18,8 +18,11 @@
# The full version, including alpha/beta/rc tags.
# The short X.Y version.

import os, sys
import os
import sys

from _pytest import __version__ as version

release = ".".join(version.split(".")[:2])

# If extensions (or modules to document with autodoc) are in another directory,
Expand All @@ -38,7 +41,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.autosummary',
'sphinx.ext.intersphinx', 'sphinx.ext.viewcode']
'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', 'sphinxcontrib_trio']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -310,9 +313,7 @@


# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('http://docs.python.org/', None),
# 'lib': ("http://docs.python.org/2.7library/", None),
}
intersphinx_mapping = {'python': ('http://docs.python.org/3', None)}


def setup(app):
Expand Down
1 change: 1 addition & 0 deletions doc/en/requirements.txt
@@ -1,3 +1,4 @@
# pinning sphinx to 1.4.* due to search issues with rtd:
# https://github.com/rtfd/readthedocs-sphinx-ext/issues/25
sphinx ==1.4.*
sphinxcontrib-trio
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -129,6 +129,7 @@ basepython = python
changedir = doc/en
deps =
sphinx
sphinxcontrib-trio
attrs
PyYAML

Expand Down

0 comments on commit 6fa9768

Please sign in to comment.