Skip to content

Commit 7d23974

Browse files
authored
Documentation fixes: JSON Example, SSL Connection Examples, RTD version (#1887)
1 parent afaa1c8 commit 7d23974

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

docs/conf.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
"sphinx.ext.autosectionlabel",
3636
]
3737

38+
# AutosectionLabel settings.
39+
# Uses a <page>:<label> schema which doesn't work for duplicate sub-section
40+
# labels, so set max depth.
41+
autosectionlabel_prefix_document = True
42+
autosectionlabel_maxdepth = 2
43+
3844
# Add any paths that contain templates here, relative to this directory.
3945
templates_path = ["_templates"]
4046

@@ -58,10 +64,10 @@
5864
# The short X.Y version.
5965
import redis
6066

61-
version = ".".join(redis.__version__.split(".")[0:2])
62-
63-
# The full version, including alpha/beta/rc tags.
64-
release = redis.__version__
67+
version = ".".join(redis.__version__.split(".")[0:3])
68+
release = version
69+
if version == "99.99.99":
70+
release = "dev"
6571

6672
# The language for content autogenerated by Sphinx. Refer to documentation
6773
# for a list of supported languages.

docs/redismodules.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ These are the commands for interacting with the `RediSearch module <https://redi
110110
.. code-block:: python
111111
112112
import redis
113+
from redis.commands.search.field import TextField
114+
113115
r = redis.Redis()
114116
r.ft().create_index(TextField("play", weight=5.0), TextField("ball"))
115117
print(r.ft().info())

0 commit comments

Comments
 (0)