Skip to content

Commit fcb9199

Browse files
author
Andrei Neagu
committed
pylint catalog
1 parent 3f779f3 commit fcb9199

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

services/catalog/tests/unit/with_dbs/conftest.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# pylint: disable=not-context-manager
22
# pylint: disable=protected-access
33
# pylint: disable=redefined-outer-name
4+
# pylint: disable=too-many-positional-arguments
45
# pylint: disable=unused-argument
56
# pylint: disable=unused-variable
67

@@ -109,7 +110,7 @@ async def product(
109110
"""
110111
# NOTE: this fixture ignores products' group-id but it is fine for this test context
111112
assert product["group_id"] is None
112-
async with insert_and_get_row_lifespan(
113+
async with insert_and_get_row_lifespan( # pylint:disable=contextmanager-generator-missing-cleanup
113114
sqlalchemy_async_engine,
114115
table=products,
115116
values=product,
@@ -149,7 +150,7 @@ async def user(
149150
injects a user in db
150151
"""
151152
assert user_id == user["id"]
152-
async with insert_and_get_row_lifespan(
153+
async with insert_and_get_row_lifespan( # pylint:disable=contextmanager-generator-missing-cleanup
153154
sqlalchemy_async_engine,
154155
table=users,
155156
values=user,
@@ -442,9 +443,9 @@ def _fake_factory(
442443

443444

444445
@pytest.fixture
445-
def create_director_list_services_from() -> Callable[
446-
[list[dict[str, Any]], list], list[dict[str, Any]]
447-
]:
446+
def create_director_list_services_from() -> (
447+
Callable[[list[dict[str, Any]], list], list[dict[str, Any]]]
448+
):
448449
"""Convenience function to merge outputs of
449450
- `create_fake_service_data` callable with those of
450451
- `expected_director_list_services` fixture

services/catalog/tests/unit/with_dbs/test_api_rest_services_specifications.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# pylint: disable=redefined-outer-name
2+
# pylint: disable=too-many-arguments
3+
# pylint: disable=too-many-positional-arguments
24
# pylint: disable=unused-argument
35
# pylint: disable=unused-variable
4-
# pylint: disable=too-many-arguments
56

67

78
import asyncio

services/catalog/tests/unit/with_dbs/test_api_rpc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# pylint: disable=redefined-outer-name
2+
# pylint: disable=too-many-arguments
3+
# pylint: disable=too-many-positional-arguments
24
# pylint: disable=unused-argument
35
# pylint: disable=unused-variable
4-
# pylint: disable=too-many-arguments
56

67

78
from collections.abc import AsyncIterator, Callable
@@ -245,7 +246,7 @@ async def other_user(
245246
) -> AsyncIterator[dict[str, Any]]:
246247

247248
_user = random_user(fake=faker, id=user_id + 1)
248-
async with insert_and_get_row_lifespan(
249+
async with insert_and_get_row_lifespan( # pylint:disable=contextmanager-generator-missing-cleanup
249250
sqlalchemy_async_engine,
250251
table=users,
251252
values=_user,

0 commit comments

Comments
 (0)