From de897fabc17a3c736d33db346658a1a311cd25bc Mon Sep 17 00:00:00 2001 From: jreadey Date: Tue, 8 Aug 2023 17:49:42 +0200 Subject: [PATCH] fix flake8 errors in small_obj_test.py --- tests/perf/smallobj/small_obj_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/perf/smallobj/small_obj_test.py b/tests/perf/smallobj/small_obj_test.py index 6f86e2f3..f1c87e63 100644 --- a/tests/perf/smallobj/small_obj_test.py +++ b/tests/perf/smallobj/small_obj_test.py @@ -157,11 +157,11 @@ async def store(group_name): for key, val in things.items(): logging.debug(f"{key}: {val}") - if type(val) == dict: + if isinstance(val, dict): logging.debug("dict") val_grp_id = await create_group(group_id, key) logging.debug(f"got val_grp_id: {val_grp_id}") - elif type(val) == ThingItem: + elif isinstance(val, ThingItem): logging.info(f"ThingItem - create_group_attributes name for group: {group_id} ") val_grp_id = await create_group(group_id, key) await create_attribute(val_grp_id, "name", val.name) @@ -177,7 +177,7 @@ async def store_items(grp_names): session = ClientSession(loop=loop, connector=TCPConnector(limit=max_tcp_connections)) globals["client"] = session xs = stream.iterate(grp_names) | pipe.map(store, ordered=False, task_limit=task_limit) - await(xs) + await xs await session.close()