Skip to content

Commit 65a7655

Browse files
pylint: fix trailing-whitespace cases
Fix all cases of C0303 trailing-whitespace. Remove trailing whitespaces from documentation as well. Part of #270
1 parent 7a17802 commit 65a7655

23 files changed

+198
-198
lines changed

.github/workflows/testing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- ''
3838

3939
# Adding too many elements to three-dimentional matrix results in
40-
# too many test cases. It causes GitHub webpages to fail with
40+
# too many test cases. It causes GitHub webpages to fail with
4141
# "This page is taking too long to load." error. Thus we use
4242
# pairwise testing.
4343
include:

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## 0.12.1 - 2023-02-28
88

99
### Changed
10-
- Discovery iproto features only for Tarantools since version 2.10.0 (#283).
10+
- Discovery iproto features only for Tarantools since version 2.10.0 (#283).
1111

1212
### Fixed
1313
- Schema fetch for spaces with foreign keys (#282).
@@ -352,7 +352,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
352352
- Various improvements and fixes in README (PR #210, PR #215).
353353

354354
### Fixed
355-
- json.dumps compatibility with Python 2 (PR #186).
355+
- json.dumps compatibility with Python 2 (PR #186).
356356
- Unix socket support in mesh_connection (PR #189, #111).
357357
- Various fixes in tests (PR #189, #111, PR #195, #194).
358358

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ You can also install the development version of the package using ``pip``.
8686
What is Tarantool?
8787
------------------
8888

89-
`Tarantool`_ is an in-memory computing platform originally designed by
89+
`Tarantool`_ is an in-memory computing platform originally designed by
9090
`VK`_ and released under the terms of `BSD license`_.
9191

9292
Features

debian/changelog

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ tarantool-python (0.9.0-0) unstable; urgency=medium
290290
transport="ssl",
291291
ssl_ca_file=client_ca_file)
292292
```
293-
293+
294294
If the server authenticates clients using certificates issued by
295295
given CA, you must provide private SSL key file with `ssl_key_file`
296296
parameter and SSL certificate file with `ssl_cert_file` parameter.
@@ -351,7 +351,7 @@ tarantool-python (0.9.0-0) unstable; urgency=medium
351351
```
352352

353353
See [Tarantool Enterprise Edition manual](https://www.tarantool.io/en/enterprise_doc/security/#enterprise-iproto-encryption)
354-
for details.
354+
for details.
355355

356356
## Breaking changes
357357

debian/rules

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ override_dh_auto_build:
1414
python3 setup.py build --force
1515

1616
override_dh_auto_install:
17-
python3 setup.py install --force --root=debian/python3-tarantool --no-compile -O0 --install-layout=deb --prefix=/usr
17+
python3 setup.py install --force --root=debian/python3-tarantool --no-compile -O0 --install-layout=deb --prefix=/usr
1818

1919
override_dh_python2:
2020
dh_python2 --no-guessing-versions

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
# pixels large.
127127
#html_favicon = None
128128

129-
# Set up favicons with sphinx_favicon.
129+
# Set up favicons with sphinx_favicon.
130130
favicons = [
131131
{
132132
"rel": "icon",

docs/source/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Python client library for Tarantool
55

66
:Version: |version|
77

8-
`Tarantool`_ is an in-memory computing platform originally designed by
8+
`Tarantool`_ is an in-memory computing platform originally designed by
99
`VK`_ and released under the terms of `BSD license`_.
1010

1111
Install Tarantool Python connector with ``pip`` (`PyPI`_ page):
@@ -78,7 +78,7 @@ API Reference
7878

7979
.. Indices and tables
8080
.. ==================
81-
..
81+
..
8282
.. * :ref:`genindex`
8383
.. * :ref:`modindex`
8484
.. * :ref:`search`

docs/source/quick-start.rst

+32-32
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Throws an error if there is already a tuple with the same primary key.
5656
... conn.insert('demo', ('BBBB', 'Bravo'))
5757
... except Exception as exc:
5858
... print(exc)
59-
...
59+
...
6060
(3, 'Duplicate key exists in unique index "pk" in space "demo" with old tuple - ["BBBB", "Bravo"] and new tuple - ["BBBB", "Bravo"]')
6161
6262
Replace
@@ -125,7 +125,7 @@ Creating a space instance
125125
An instance of :class:`~tarantool.space.Space` is a named object to access
126126
the key space.
127127

128-
Create a ``demo`` object that will be used to access the space
128+
Create a ``demo`` object that will be used to access the space
129129
with id ``'demo'``:
130130

131131
.. code-block:: python
@@ -205,26 +205,26 @@ read-write and read-only pool instances:
205205
Receiving out-of-band messages
206206
----------------------------------
207207

208-
Receiving out-of-band messages from a server that uses box.session.push
209-
call is supported for methods: :meth:`~tarantool.Connection.call`,
210-
:meth:`~tarantool.Connection.eval`, :meth:`~tarantool.Connection.select`,
211-
:meth:`~tarantool.Connection.insert`, :meth:`~tarantool.Connection.replace`,
212-
:meth:`~tarantool.Connection.update`, :meth:`~tarantool.Connection.upsert`,
208+
Receiving out-of-band messages from a server that uses box.session.push
209+
call is supported for methods: :meth:`~tarantool.Connection.call`,
210+
:meth:`~tarantool.Connection.eval`, :meth:`~tarantool.Connection.select`,
211+
:meth:`~tarantool.Connection.insert`, :meth:`~tarantool.Connection.replace`,
212+
:meth:`~tarantool.Connection.update`, :meth:`~tarantool.Connection.upsert`,
213213
:meth:`~tarantool.Connection.delete`.
214214

215-
To work with out-of-band messages, 2 optional arguments are used in
215+
To work with out-of-band messages, 2 optional arguments are used in
216216
the methods listed above:
217217

218218
* `on_push` - callback, launched with the received data for each out-of-band message. Two arguments for this callback are expected:
219-
219+
220220
* the first is the received from an out-of-band message data.
221221

222222
* the second is `on_push_ctx`, variable for working with callback context (for example, recording the result or pass data to callback).
223223
* `on_push_ctx` - result of the `on_push` work can be written to this variable, or through this variable you can pass data to `on_push` callback.
224224

225-
Below is an example of the proposed API with method :meth:`~tarantool.Connection.call`
226-
and :meth:`~tarantool.Connection.insert`. In the described example, before the end
227-
of the :meth:`~tarantool.Connection.call` and :meth:`~tarantool.Connection.insert`,
225+
Below is an example of the proposed API with method :meth:`~tarantool.Connection.call`
226+
and :meth:`~tarantool.Connection.insert`. In the described example, before the end
227+
of the :meth:`~tarantool.Connection.call` and :meth:`~tarantool.Connection.insert`,
228228
out-of-band messages are processed via specified callback.
229229

230230
In the example below, two shells are used, in the first we will configure the server:
@@ -249,7 +249,7 @@ In the example below, two shells are used, in the first we will configure the se
249249
return x
250250
end
251251
252-
In the second shell, we will execute a :meth:`~tarantool.Connection.call`
252+
In the second shell, we will execute a :meth:`~tarantool.Connection.call`
253253
with receiving out-of-band messages from the server:
254254

255255
.. code-block:: python
@@ -266,11 +266,11 @@ with receiving out-of-band messages from the server:
266266
conn = tarantool.Connection(port=3301)
267267
res = conn.call(
268268
'server_function',
269-
on_push=callback,
269+
on_push=callback,
270270
on_push_ctx=callback_res
271271
)
272272
273-
# receiving out-of-band messages,
273+
# receiving out-of-band messages,
274274
# the conn.call is not finished yet.
275275
276276
>>> run callback with data: [[1, 0]]
@@ -285,7 +285,7 @@ with receiving out-of-band messages from the server:
285285
print(callback_res)
286286
>>> [[[1, 1]], [[2, 1]], [[3, 1]]]
287287
288-
Let's go back to the first shell with the server and
288+
Let's go back to the first shell with the server and
289289
create a space and a trigger for it:
290290

291291
.. code-block:: lua
@@ -315,7 +315,7 @@ create a space and a trigger for it:
315315
on_replace_callback
316316
)
317317
318-
Now, in the second shell, we will execute an :meth:`~tarantool.ConnectionPool.insert`
318+
Now, in the second shell, we will execute an :meth:`~tarantool.ConnectionPool.insert`
319319
with out-of-band message processing:
320320

321321
.. code-block:: python
@@ -333,7 +333,7 @@ with out-of-band message processing:
333333
on_push_ctx=callback_res,
334334
)
335335
336-
# receiving out-of-band messages,
336+
# receiving out-of-band messages,
337337
# the conn_pool.insert is not finished yet.
338338
339339
>>> run callback with data: [[100, 0]]
@@ -352,7 +352,7 @@ with out-of-band message processing:
352352
Interaction with the crud module
353353
----------------------------------
354354

355-
Through the :class:`~tarantool.Connection` object, you can access
355+
Through the :class:`~tarantool.Connection` object, you can access
356356
`crud module <https://github.com/tarantool/crud>`_ methods:
357357

358358
.. code-block:: python
@@ -362,16 +362,16 @@ Through the :class:`~tarantool.Connection` object, you can access
362362
>>> conn = tarantool.Connection(host='localhost',port=3301,fetch_schema=False)
363363
364364
>>> conn.crud_
365-
conn.crud_count( conn.crud_insert( conn.crud_insert_object_many(
366-
conn.crud_min( conn.crud_replace_object( conn.crud_stats(
367-
conn.crud_unflatten_rows( conn.crud_upsert_many( conn.crud_delete(
368-
conn.crud_insert_many( conn.crud_len( conn.crud_replace(
369-
conn.crud_replace_object_many( conn.crud_storage_info( conn.crud_update(
370-
conn.crud_upsert_object( conn.crud_get( conn.crud_insert_object(
371-
conn.crud_max( conn.crud_replace_many( conn.crud_select(
365+
conn.crud_count( conn.crud_insert( conn.crud_insert_object_many(
366+
conn.crud_min( conn.crud_replace_object( conn.crud_stats(
367+
conn.crud_unflatten_rows( conn.crud_upsert_many( conn.crud_delete(
368+
conn.crud_insert_many( conn.crud_len( conn.crud_replace(
369+
conn.crud_replace_object_many( conn.crud_storage_info( conn.crud_update(
370+
conn.crud_upsert_object( conn.crud_get( conn.crud_insert_object(
371+
conn.crud_max( conn.crud_replace_many( conn.crud_select(
372372
conn.crud_truncate( conn.crud_upsert( conn.crud_upsert_object_many(
373373
374-
As an example, consider :meth:`~tarantool.Connection.crud_insert` and :meth:`~tarantool.Connection.crud_insert_object_many`.
374+
As an example, consider :meth:`~tarantool.Connection.crud_insert` and :meth:`~tarantool.Connection.crud_insert_object_many`.
375375
It is recommended to enclose calls in the try-except construction as follows:
376376
377377
.. code-block:: python
@@ -392,13 +392,13 @@ It is recommended to enclose calls in the try-except construction as follows:
392392
... res = conn.crud_insert('tester', (3500,300,'Rob'))
393393
... except CrudModuleError as e:
394394
... exc_crud = e
395-
...
395+
...
396396
>>> exc_crud
397397
CrudModuleError(0, 'Failed to insert: Duplicate key exists in unique index "primary_index" in space "tester" with old tuple - [3500, 300, "Rob"] and new tuple - [3500, 300, "Rob"]')
398398
>>> exc_crud.extra_info_error
399399
<tarantool.crud.CrudError object at 0x10a276950>
400400
>>> exc_crud.extra_info_error.
401-
exc_crud.extra_info_error.class_name exc_crud.extra_info_error.err exc_crud.extra_info_error.file exc_crud.extra_info_error.line exc_crud.extra_info_error.str
401+
exc_crud.extra_info_error.class_name exc_crud.extra_info_error.err exc_crud.extra_info_error.file exc_crud.extra_info_error.line exc_crud.extra_info_error.str
402402
>>> exc_crud.extra_info_error.class_name
403403
'InsertError'
404404
>>> exc_crud.extra_info_error.str
@@ -409,7 +409,7 @@ It is recommended to enclose calls in the try-except construction as follows:
409409
... res = conn.crud_insert_object_many('tester', ({'id':3,'bucket_id':100,'name':'Ann'}, {'id':4,'bucket_id':100,'name':'Sam'}), {'timeout':100, 'rollback_on_error':False})
410410
... except CrudModuleManyError as e:
411411
... exc_crud = e
412-
...
412+
...
413413
>>> exc_crud
414414
CrudModuleManyError(0, 'Got multiple errors, see errors_list')
415415
>>> exc_crud.success_list # some of the rows were inserted.
@@ -422,7 +422,7 @@ It is recommended to enclose calls in the try-except construction as follows:
422422
'CallError: Failed for 037adb3a-b9e3-4f78-a6d1-9f0cdb6cbefc: Function returned an error: Duplicate key exists in unique index "primary_index" in space "tester" with old tuple - [3500, 300, "Rob"] and new tuple - [3500, 100, "Mike"]'
423423
>>> exc_crud.errors_list[1].str
424424
'InsertManyError: Failed to flatten object: FlattenError: Object is specified in bad format: FlattenError: Unknown field "second_name" is specified'
425-
425+
426426
# If there are no problems with any rows, the entire response will be contained in the res variable.
427427
>>> res = conn.crud_insert_object_many('tester', ({'id':3,'bucket_id':100,'name':'Ann'}, {'id':4,'bucket_id':100,'name':'Sam'}), {'timeout':100, 'rollback_on_error':False})
428428
>>> res.rows
@@ -436,7 +436,7 @@ If module crud not found on the router or user has not sufficient grants:
436436
... res = conn.crud_insert('tester', (22221,300,'Rob'))
437437
... except DatabaseError as e:
438438
... exc_db = e
439-
...
439+
...
440440
>>> exc_db
441441
DatabaseError(33, "Procedure 'crud.insert' is not defined. Ensure that you're calling crud.router and user has sufficient grants")
442442
>>> exc_db.extra_info

0 commit comments

Comments
 (0)