Skip to content

Commit fb83d2d

Browse files
kurtmckeeaiven-sal
authored andcommitted
Resolve some docs warnings
Get rid of some warning related to documentation. Signed-off-by: Salvatore Mesoraca <[email protected]>
1 parent cda0803 commit fb83d2d

File tree

7 files changed

+44
-39
lines changed

7 files changed

+44
-39
lines changed

.github/wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,4 @@ valkeymodules
159159
virtualenv
160160
www
161161
md
162+
yaml

docs/conf.py

Lines changed: 0 additions & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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 Valkey, 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

Lines changed: 4 additions & 4 deletions
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 valkey-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 Valkey shard is down:
127127

128-
.. code-block:: python
128+
.. code-block:: yaml
129129
130130
monitors:
131131
- name: Valkey 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: Valkey read hit rate < 75%

valkey/commands/core.py

Lines changed: 16 additions & 11 deletions
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://valkey.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
@@ -3363,7 +3364,7 @@ def sintercard(
33633364
self, numkeys: int, keys: List[str], limit: int = 0
33643365
) -> Union[Awaitable[int], int]:
33653366
"""
3366-
Return the cardinality of the intersect of multiple sets specified by ``keys`.
3367+
Return the cardinality of the intersect of multiple sets specified by ``keys``.
33673368
33683369
When LIMIT provided (defaults to 0 and means unlimited), if the intersection
33693370
cardinality reaches limit partway through the computation, the algorithm will
@@ -3494,9 +3495,11 @@ class StreamCommands(CommandsProtocol):
34943495
def xack(self, name: KeyT, groupname: GroupT, *ids: StreamIdT) -> ResponseT:
34953496
"""
34963497
Acknowledges the successful processing of one or more messages.
3497-
name: name of the stream.
3498-
groupname: name of the consumer group.
3499-
*ids: message ids to acknowledge.
3498+
3499+
Args:
3500+
name: name of the stream.
3501+
groupname: name of the consumer group.
3502+
*ids: message ids to acknowledge.
35003503
35013504
For more information see https://valkey.io/commands/xack
35023505
"""
@@ -3692,8 +3695,10 @@ def xclaim(
36923695
def xdel(self, name: KeyT, *ids: StreamIdT) -> ResponseT:
36933696
"""
36943697
Deletes one or more messages from a stream.
3695-
name: name of the stream.
3696-
*ids: message ids to delete.
3698+
3699+
Args:
3700+
name: name of the stream.
3701+
*ids: message ids to delete.
36973702
36983703
For more information see https://valkey.io/commands/xdel
36993704
"""
@@ -4261,7 +4266,7 @@ def zintercard(
42614266
) -> Union[Awaitable[int], int]:
42624267
"""
42634268
Return the cardinality of the intersect of multiple sorted sets
4264-
specified by ``keys`.
4269+
specified by ``keys``.
42654270
When LIMIT provided (defaults to 0 and means unlimited), if the intersection
42664271
cardinality reaches limit partway through the computation, the algorithm will
42674272
exit and yield limit as the cardinality

valkey/commands/graph/commands.py

Lines changed: 1 addition & 1 deletion
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://valkey.io/commands/graph.config-get/>`_. # noqa
158+
For more information see `<https://redis.io/commands/graph.config-get/>`__.
159159
160160
Args:
161161

valkey/commands/search/commands.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -335,30 +335,30 @@ def add_document(
335335
"""
336336
Add a single document to the index.
337337
338-
### Parameters
338+
Args:
339339
340-
- **doc_id**: the id of the saved document.
341-
- **nosave**: if set to true, we just index the document, and don't
340+
doc_id: the id of the saved document.
341+
nosave: if set to true, we just index the document, and don't
342342
save a copy of it. This means that searches will just
343343
return ids.
344-
- **score**: the document ranking, between 0.0 and 1.0
345-
- **payload**: optional inner-index payload we can save for fast
346-
i access in scoring functions
347-
- **replace**: if True, and the document already is in the index,
348-
we perform an update and reindex the document
349-
- **partial**: if True, the fields specified will be added to the
344+
score: the document ranking, between 0.0 and 1.0
345+
payload: optional inner-index payload we can save for fast
346+
access in scoring functions
347+
replace: if True, and the document already is in the index,
348+
we perform an update and reindex the document
349+
partial: if True, the fields specified will be added to the
350350
existing document.
351351
This has the added benefit that any fields specified
352352
with `no_index`
353353
will not be reindexed again. Implies `replace`
354-
- **language**: Specify the language used for document tokenization.
355-
- **no_create**: if True, the document is only updated and reindexed
354+
language: Specify the language used for document tokenization.
355+
no_create: if True, the document is only updated and reindexed
356356
if it already exists.
357357
If the document does not exist, an error will be
358358
returned. Implies `replace`
359-
- **fields** kwargs dictionary of the document fields to be saved
360-
and/or indexed.
361-
NOTE: Geo points shoule be encoded as strings of "lon,lat"
359+
fields: kwargs dictionary of the document fields to be saved
360+
and/or indexed.
361+
NOTE: Geo points shoule be encoded as strings of "lon,lat"
362362
""" # noqa
363363
return self._add_document(
364364
doc_id,
@@ -620,13 +620,13 @@ def spellcheck(self, query, distance=None, include=None, exclude=None):
620620
"""
621621
Issue a spellcheck query
622622
623-
### Parameters
623+
Args:
624624
625-
**query**: search query.
626-
**distance***: the maximal Levenshtein distance for spelling
625+
query: search query.
626+
distance: the maximal Levenshtein distance for spelling
627627
suggestions (default: 1, max: 4).
628-
**include**: specifies an inclusion custom dictionary.
629-
**exclude**: specifies an exclusion custom dictionary.
628+
include: specifies an inclusion custom dictionary.
629+
exclude: specifies an exclusion custom dictionary.
630630
631631
For more information see `FT.SPELLCHECK <https://valkey.io/commands/ft.spellcheck>`_.
632632
""" # noqa

0 commit comments

Comments
 (0)