Skip to content

Fix lint #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
git+https://github.com/baztian/dbapi-compliance.git@ea7cb1b4#egg=dbapi-compliance
pyyaml==6.0
importlib-metadata >= 1.0 ; python_version < '3.8'
pylint
flake8
codespell
pylint ~= 3.0 ; python_version >= '3.8'
pylint ~= 2.13 ; python_version < '3.8'
flake8 ~= 6.1 ; python_version >= '3.8'
flake8 ~= 5.0 ; python_version < '3.8'
codespell ~= 2.2
8 changes: 8 additions & 0 deletions tarantool/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def delete(self, space_name, key, *, index=None, on_push=None, on_push_ctx=None)
"""
Reference implementation: :meth:`~tarantool.Connection.delete`.
"""
# pylint: disable=too-many-arguments

raise NotImplementedError

Expand All @@ -224,6 +225,7 @@ def upsert(self, space_name, tuple_value, op_list, *, index=None,
"""
Reference implementation: :meth:`~tarantool.Connection.upsert`.
"""
# pylint: disable=too-many-arguments

raise NotImplementedError

Expand All @@ -232,6 +234,7 @@ def update(self, space_name, key, op_list, *, index=None, on_push=None, on_push_
"""
Reference implementation: :meth:`~tarantool.Connection.update`.
"""
# pylint: disable=too-many-arguments

raise NotImplementedError

Expand All @@ -249,6 +252,7 @@ def select(self, space_name, key, *, offset=None, limit=None,
"""
Reference implementation: :meth:`~tarantool.Connection.select`.
"""
# pylint: disable=too-many-arguments

raise NotImplementedError

Expand Down Expand Up @@ -1618,6 +1622,7 @@ def delete(self, space_name, key, *, index=0, on_push=None, on_push_ctx=None):

.. _delete: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/delete/
"""
# pylint: disable=too-many-arguments

self._schemaful_connection_check()

Expand Down Expand Up @@ -1680,6 +1685,7 @@ def upsert(self, space_name, tuple_value, op_list, *, index=0, on_push=None, on_

.. _upsert: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/upsert/
"""
# pylint: disable=too-many-arguments

self._schemaful_connection_check()

Expand Down Expand Up @@ -1771,6 +1777,7 @@ def update(self, space_name, key, op_list, *, index=0, on_push=None, on_push_ctx

.. _update: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/update/
"""
# pylint: disable=too-many-arguments

self._schemaful_connection_check()

Expand Down Expand Up @@ -1961,6 +1968,7 @@ def select(self, space_name, key=None, *, offset=0, limit=0xffffffff, index=0, i

.. _select: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/select/
"""
# pylint: disable=too-many-arguments

self._schemaful_connection_check()

Expand Down
9 changes: 9 additions & 0 deletions tarantool/connection_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ def replace(self, space_name, values, *, mode=Mode.RW, on_push=None, on_push_ctx

.. _replace: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/replace/
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'replace', space_name, values,
on_push=on_push, on_push_ctx=on_push_ctx)
Expand Down Expand Up @@ -850,6 +851,7 @@ def insert(self, space_name, values, *, mode=Mode.RW, on_push=None, on_push_ctx=

.. _insert: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/insert/
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'insert', space_name, values,
on_push=on_push, on_push_ctx=on_push_ctx)
Expand Down Expand Up @@ -883,6 +885,7 @@ def delete(self, space_name, key, *, index=0, mode=Mode.RW, on_push=None, on_pus

.. _delete: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/delete/
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'delete', space_name, key, index=index,
on_push=on_push, on_push_ctx=on_push_ctx)
Expand Down Expand Up @@ -920,6 +923,7 @@ def upsert(self, space_name, tuple_value, op_list, *, index=0, mode=Mode.RW,

.. _upsert: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/upsert/
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'upsert', space_name, tuple_value,
op_list, index=index, on_push=on_push, on_push_ctx=on_push_ctx)
Expand Down Expand Up @@ -957,6 +961,7 @@ def update(self, space_name, key, op_list, *, index=0, mode=Mode.RW,

.. _update: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/update/
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'update', space_name, key,
op_list, index=index, on_push=on_push, on_push_ctx=on_push_ctx)
Expand Down Expand Up @@ -1023,6 +1028,7 @@ def select(self, space_name, key, *, offset=0, limit=0xffffffff,

.. _select: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/select/
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'select', space_name, key, offset=offset, limit=limit,
index=index, iterator=iterator, on_push=on_push, on_push_ctx=on_push_ctx)
Expand Down Expand Up @@ -1214,6 +1220,7 @@ def crud_update(self, space_name, key, operations=None, opts=None, *, mode=Mode.
:raise: :exc:`~tarantool.error.CrudModuleError`,
:exc:`~tarantool.error.DatabaseError`
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'crud_update', space_name, key, operations, opts)

Expand Down Expand Up @@ -1379,6 +1386,7 @@ def crud_upsert(self, space_name, values, operations=None, opts=None, *, mode=Mo
:raise: :exc:`~tarantool.error.CrudModuleError`,
:exc:`~tarantool.error.DatabaseError`
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'crud_upsert', space_name, values, operations, opts)

Expand Down Expand Up @@ -1409,6 +1417,7 @@ def crud_upsert_object(self, space_name, values, operations=None, opts=None, *,
:raise: :exc:`~tarantool.error.CrudModuleError`,
:exc:`~tarantool.error.DatabaseError`
"""
# pylint: disable=too-many-arguments

return self._send(mode, 'crud_upsert_object', space_name, values, operations, opts)

Expand Down
2 changes: 1 addition & 1 deletion tarantool/msgpack_ext/types/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def __init__(self, *, timestamp=None, year=None, month=None,

.. _datetime.new(): https://www.tarantool.io/en/doc/latest/reference/reference_lua/datetime/new/
"""
# pylint: disable=too-many-branches,too-many-locals,too-many-statements
# pylint: disable=too-many-branches,too-many-locals,too-many-statements,too-many-arguments

tzinfo = None
if tz != '':
Expand Down
1 change: 1 addition & 0 deletions tarantool/msgpack_ext/types/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def __init__(self, *, year=0, month=0, week=0,

:raise: :exc:`ValueError`
"""
# pylint: disable=too-many-arguments

self.year = year
self.month = month
Expand Down
2 changes: 1 addition & 1 deletion tarantool/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This module provides untility functions for the package.
This module provides utility functions for the package.
"""

from base64 import decodebytes as base64_decode
Expand Down
2 changes: 1 addition & 1 deletion test/suites/test_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def test_unknown_adjust_decode(self):
}

def test_out_of_range(self):
# pylint: disable=cell-var-from-loop
# pylint: disable=cell-var-from-loop,unnecessary-lambda

for name, case in self.out_of_range_cases.items():
with self.subTest(msg=name):
Expand Down