Skip to content

Commit 6ef129e

Browse files
committed
Add sphinx-codeautolink
1 parent 5b9e413 commit 6ef129e

4 files changed

Lines changed: 17 additions & 1 deletion

File tree

‎hypothesis-python/docs/conf.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"sphinx.ext.viewcode",
3333
"sphinx.ext.intersphinx",
3434
"hoverxref.extension",
35+
"sphinx_codeautolink",
3536
"sphinx_selective_exclude.eager_only",
3637
]
3738

@@ -94,6 +95,13 @@ def setup(app):
9495

9596
autodoc_mock_imports = ["numpy", "pandas", "redis"]
9697

98+
codeautolink_autodoc_inject = False
99+
codeautolink_global_preface = """
100+
from hypothesis import *
101+
import hypothesis.strategies as st
102+
from hypothesis.strategies import *
103+
"""
104+
97105
# This config value must be a dictionary of external sites, mapping unique
98106
# short alias names to a base URL and a prefix.
99107
# See http://sphinx-doc.org/ext/extlinks.html

‎hypothesis-python/docs/reproducing.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ as follows:
140140
... pass
141141
...
142142
Falsifying example: test(f=nan)
143-
<BLANKLINE>
143+
144144
You can reproduce this example by temporarily adding @reproduce_failure(..., b'AAAA//AAAAAAAAEA') as a decorator on your test case
145145
146146
Adding the suggested decorator to the test should reproduce the failure (as

‎requirements/tools.in‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ requests
2121
restructuredtext-lint
2222
shed
2323
sphinx
24+
sphinx-codeautolink
2425
sphinx-hoverxref
2526
sphinx-rtd-theme
2627
sphinx-selective-exclude

‎requirements/tools.txt‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ backports.entry-points-selectable==1.1.0
2323
# via virtualenv
2424
bandit==1.7.0
2525
# via flake8-bandit
26+
beautifulsoup4==4.10.0
27+
# via sphinx-codeautolink
2628
black==21.9b0
2729
# via
2830
# blacken-docs
@@ -254,10 +256,15 @@ snowballstemmer==2.1.0
254256
# sphinx
255257
sortedcontainers==2.4.0
256258
# via hypothesis (hypothesis-python/setup.py)
259+
soupsieve==2.2.1
260+
# via beautifulsoup4
257261
sphinx==4.2.0
258262
# via
259263
# -r requirements/tools.in
264+
# sphinx-codeautolink
260265
# sphinx-rtd-theme
266+
sphinx-codeautolink==0.3.0
267+
# via -r requirements/tools.in
261268
sphinx-hoverxref==0.7b1
262269
# via -r requirements/tools.in
263270
sphinx-rtd-theme==1.0.0

0 commit comments

Comments
 (0)