Skip to content

Commit 2ffcac3

Browse files
authored
Resolve some docs warnings (#3322)
Get rid of some warning related to documentation.
1 parent 7e2b4fb commit 2ffcac3

File tree

7 files changed

+44
-39
lines changed

7 files changed

+44
-39
lines changed

.github/wordlist.txt

+1
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,4 @@ unicode
141141
url
142142
virtualenv
143143
www
144+
yaml

docs/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@
128128
# further. For a list of options available for each theme, see the
129129
# documentation.
130130
html_theme_options = {
131-
"display_version": True,
132131
"footer_icons": [
133132
{
134133
"name": "GitHub",

docs/connections.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ClusterNode
5555
Async Client
5656
************
5757

58-
See complete example: `here <examples/asyncio_examples.html>`_
58+
See complete example: `here <examples/asyncio_examples.html>`__
5959

6060
This client is used for communicating with Redis, asynchronously.
6161

@@ -88,7 +88,7 @@ ClusterPipeline (Async)
8888
Connection
8989
**********
9090

91-
See complete example: `here <examples/connection_examples.html>`_
91+
See complete example: `here <examples/connection_examples.html>`__
9292

9393
Connection
9494
==========
@@ -104,7 +104,7 @@ Connection (Async)
104104
Connection Pools
105105
****************
106106

107-
See complete example: `here <examples/connection_examples.html>`_
107+
See complete example: `here <examples/connection_examples.html>`__
108108

109109
ConnectionPool
110110
==============

docs/opentelemetry.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Integrating OpenTelemetry
44
What is OpenTelemetry?
55
----------------------
66

7-
`OpenTelemetry <https://opentelemetry.io>`_ is an open-source observability framework for traces, metrics, and logs. It is a merger of OpenCensus and OpenTracing projects hosted by Cloud Native Computing Foundation.
7+
`OpenTelemetry <https://opentelemetry.io>`__ is an open-source observability framework for traces, metrics, and logs. It is a merger of OpenCensus and OpenTracing projects hosted by Cloud Native Computing Foundation.
88

99
OpenTelemetry allows developers to collect and export telemetry data in a vendor agnostic way. With OpenTelemetry, you can instrument your application once and then add or change vendors without changing the instrumentation, for example, here is a list of `popular DataDog competitors <https://uptrace.dev/get/compare/datadog-competitors.html>`_ that support OpenTelemetry.
1010

@@ -61,7 +61,7 @@ Once the code is patched, you can use redis-py as usually:
6161
OpenTelemetry API
6262
-----------------
6363

64-
`OpenTelemetry <https://uptrace.dev/opentelemetry/>`_ API is a programming interface that you can use to instrument code and collect telemetry data such as traces, metrics, and logs.
64+
`OpenTelemetry API <https://uptrace.dev/opentelemetry/>`__ is a programming interface that you can use to instrument code and collect telemetry data such as traces, metrics, and logs.
6565

6666
You can use OpenTelemetry API to measure important operations:
6767

@@ -125,7 +125,7 @@ Alerting and notifications
125125

126126
Uptrace also allows you to monitor `OpenTelemetry metrics <https://uptrace.dev/opentelemetry/metrics.html>`_ using alerting rules. For example, the following monitor uses the group by node expression to create an alert whenever an individual Redis shard is down:
127127

128-
.. code-block:: python
128+
.. code-block:: yaml
129129
130130
monitors:
131131
- name: Redis shard is down
@@ -142,7 +142,7 @@ Uptrace also allows you to monitor `OpenTelemetry metrics <https://uptrace.dev/o
142142
143143
You can also create queries with more complex expressions. For example, the following rule creates an alert when the keyspace hit rate is lower than 75%:
144144

145-
.. code-block:: python
145+
.. code-block:: yaml
146146
147147
monitors:
148148
- name: Redis read hit rate < 75%

redis/commands/core.py

+16-11
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def acl_dryrun(self, username, *args, **kwargs):
7979

8080
def acl_deluser(self, *username: str, **kwargs) -> ResponseT:
8181
"""
82-
Delete the ACL for the specified ``username``s
82+
Delete the ACL for the specified ``username``\\s
8383
8484
For more information see https://redis.io/commands/acl-deluser
8585
"""
@@ -227,9 +227,10 @@ def acl_setuser(
227227
must be prefixed with either a '+' to add the command permission
228228
or a '-' to remove the command permission.
229229
keys: A list of key patterns to grant the user access to. Key patterns allow
230-
'*' to support wildcard matching. For example, '*' grants access to
231-
all keys while 'cache:*' grants access to all keys that are prefixed
232-
with 'cache:'. `keys` should not be prefixed with a '~'.
230+
``'*'`` to support wildcard matching. For example, ``'*'`` grants
231+
access to all keys while ``'cache:*'`` grants access to all keys that
232+
are prefixed with ``cache:``.
233+
`keys` should not be prefixed with a ``'~'``.
233234
reset: Indicates whether the user should be fully reset prior to applying
234235
the new ACL. Setting this to `True` will remove all existing
235236
passwords, flags, and privileges from the user and then apply the
@@ -3366,7 +3367,7 @@ def sintercard(
33663367
self, numkeys: int, keys: List[str], limit: int = 0
33673368
) -> Union[Awaitable[int], int]:
33683369
"""
3369-
Return the cardinality of the intersect of multiple sets specified by ``keys`.
3370+
Return the cardinality of the intersect of multiple sets specified by ``keys``.
33703371
33713372
When LIMIT provided (defaults to 0 and means unlimited), if the intersection
33723373
cardinality reaches limit partway through the computation, the algorithm will
@@ -3498,9 +3499,11 @@ class StreamCommands(CommandsProtocol):
34983499
def xack(self, name: KeyT, groupname: GroupT, *ids: StreamIdT) -> ResponseT:
34993500
"""
35003501
Acknowledges the successful processing of one or more messages.
3501-
name: name of the stream.
3502-
groupname: name of the consumer group.
3503-
*ids: message ids to acknowledge.
3502+
3503+
Args:
3504+
name: name of the stream.
3505+
groupname: name of the consumer group.
3506+
*ids: message ids to acknowledge.
35043507
35053508
For more information see https://redis.io/commands/xack
35063509
"""
@@ -3696,8 +3699,10 @@ def xclaim(
36963699
def xdel(self, name: KeyT, *ids: StreamIdT) -> ResponseT:
36973700
"""
36983701
Deletes one or more messages from a stream.
3699-
name: name of the stream.
3700-
*ids: message ids to delete.
3702+
3703+
Args:
3704+
name: name of the stream.
3705+
*ids: message ids to delete.
37013706
37023707
For more information see https://redis.io/commands/xdel
37033708
"""
@@ -4265,7 +4270,7 @@ def zintercard(
42654270
) -> Union[Awaitable[int], int]:
42664271
"""
42674272
Return the cardinality of the intersect of multiple sorted sets
4268-
specified by ``keys`.
4273+
specified by ``keys``.
42694274
When LIMIT provided (defaults to 0 and means unlimited), if the intersection
42704275
cardinality reaches limit partway through the computation, the algorithm will
42714276
exit and yield limit as the cardinality

redis/commands/graph/commands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def slowlog(self):
155155
def config(self, name, value=None, set=False):
156156
"""
157157
Retrieve or update a RedisGraph configuration.
158-
For more information see `https://redis.io/commands/graph.config-get/>`_. # noqa
158+
For more information see `<https://redis.io/commands/graph.config-get/>`__.
159159
160160
Args:
161161

redis/commands/search/commands.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -337,30 +337,30 @@ def add_document(
337337
"""
338338
Add a single document to the index.
339339
340-
### Parameters
340+
Args:
341341
342-
- **doc_id**: the id of the saved document.
343-
- **nosave**: if set to true, we just index the document, and don't
342+
doc_id: the id of the saved document.
343+
nosave: if set to true, we just index the document, and don't
344344
save a copy of it. This means that searches will just
345345
return ids.
346-
- **score**: the document ranking, between 0.0 and 1.0
347-
- **payload**: optional inner-index payload we can save for fast
348-
i access in scoring functions
349-
- **replace**: if True, and the document already is in the index,
350-
we perform an update and reindex the document
351-
- **partial**: if True, the fields specified will be added to the
346+
score: the document ranking, between 0.0 and 1.0
347+
payload: optional inner-index payload we can save for fast
348+
access in scoring functions
349+
replace: if True, and the document already is in the index,
350+
we perform an update and reindex the document
351+
partial: if True, the fields specified will be added to the
352352
existing document.
353353
This has the added benefit that any fields specified
354354
with `no_index`
355355
will not be reindexed again. Implies `replace`
356-
- **language**: Specify the language used for document tokenization.
357-
- **no_create**: if True, the document is only updated and reindexed
356+
language: Specify the language used for document tokenization.
357+
no_create: if True, the document is only updated and reindexed
358358
if it already exists.
359359
If the document does not exist, an error will be
360360
returned. Implies `replace`
361-
- **fields** kwargs dictionary of the document fields to be saved
362-
and/or indexed.
363-
NOTE: Geo points shoule be encoded as strings of "lon,lat"
361+
fields: kwargs dictionary of the document fields to be saved
362+
and/or indexed.
363+
NOTE: Geo points shoule be encoded as strings of "lon,lat"
364364
""" # noqa
365365
return self._add_document(
366366
doc_id,
@@ -627,13 +627,13 @@ def spellcheck(self, query, distance=None, include=None, exclude=None):
627627
"""
628628
Issue a spellcheck query
629629
630-
### Parameters
630+
Args:
631631
632-
**query**: search query.
633-
**distance***: the maximal Levenshtein distance for spelling
632+
query: search query.
633+
distance: the maximal Levenshtein distance for spelling
634634
suggestions (default: 1, max: 4).
635-
**include**: specifies an inclusion custom dictionary.
636-
**exclude**: specifies an exclusion custom dictionary.
635+
include: specifies an inclusion custom dictionary.
636+
exclude: specifies an exclusion custom dictionary.
637637
638638
For more information see `FT.SPELLCHECK <https://redis.io/commands/ft.spellcheck>`_.
639639
""" # noqa

0 commit comments

Comments
 (0)