Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
DAP-2146: Fixed SyntaxWarning: invalid escape sequence '\*'
Browse files Browse the repository at this point in the history
  • Loading branch information
paveu committed Mar 3, 2024
1 parent 2758112 commit d5c6d48
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cassandra/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2153,10 +2153,10 @@ def add_request_init_listener(self, fn, *args, **kwargs):
Adds a callback with arguments to be called when any request is created.
It will be invoked as `fn(response_future, *args, **kwargs)` after each client request is created,
and before the request is sent\*. This can be used to create extensions by adding result callbacks to the
and before the request is sent\\*. This can be used to create extensions by adding result callbacks to the
response future.
\* where `response_future` is the :class:`.ResponseFuture` for the request.
\\* where `response_future` is the :class:`.ResponseFuture` for the request.
Note that the init callback is done on the client thread creating the request, so you may need to consider
synchronization if you have multiple threads. Any callbacks added to the response future will be executed
Expand Down
2 changes: 1 addition & 1 deletion cassandra/cqlengine/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def setup(
:param int consistency: The global default :class:`~.ConsistencyLevel` - default is the same as :attr:`.Session.default_consistency_level`
:param bool lazy_connect: True if should not connect until first use
:param bool retry_connect: True if we should retry to connect even if there was a connection failure initially
:param \*\*kwargs: Pass-through keyword arguments for :class:`cassandra.cluster.Cluster`
:param kwargs: Pass-through keyword arguments for :class:`cassandra.cluster.Cluster`
"""

from cassandra.cqlengine import models
Expand Down
4 changes: 2 additions & 2 deletions cassandra/cqlengine/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ def add_callback(self, fn, *args, **kwargs):
:param fn: Callable object
:type fn: callable
:param \*args: Positional arguments to be passed to the callback at the time of execution
:param \*\*kwargs: Named arguments to be passed to the callback at the time of execution
:param args: Positional arguments to be passed to the callback at the time of execution
:param kwargs: Named arguments to be passed to the callback at the time of execution
"""
if not callable(fn):
raise ValueError("Value for argument 'fn' is {0} and is not a callable object.".format(type(fn)))
Expand Down
4 changes: 2 additions & 2 deletions cassandra/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ class OrderedMap(Mapping):
['value', 'value2']
These constructs are needed to support nested collections in Cassandra 2.1.3+,
where frozen collections can be specified as parameters to others\*::
where frozen collections can be specified as parameters to others\\*::
CREATE TABLE example (
...
Expand All @@ -749,7 +749,7 @@ class OrderedMap(Mapping):
This class derives from the (immutable) Mapping API. Objects in these maps
are not intended be modified.
\* Note: Because of the way Cassandra encodes nested types, when using the
\\* Note: Because of the way Cassandra encodes nested types, when using the
driver with nested collections, :attr:`~.Cluster.protocol_version` must be 3
or higher.
Expand Down

0 comments on commit d5c6d48

Please sign in to comment.