Expanded type coverage to benchmarks, samples and tests. (#566)
* Renamed json samples to fix duplicate module name. Signed-off-by: dblock <[email protected]> * Enabled mypy on all source files. Signed-off-by: dblock <[email protected]> * Added missing types. Signed-off-by: dblock <[email protected]> * Added CHANGELOG. Signed-off-by: dblock <[email protected]> * Move type: ignore to fix untyped decorator makes function untyped. Signed-off-by: dblock <[email protected]> * Fix nox -rs lint-3.7. Signed-off-by: dblock <[email protected]> * Fixed incorrect import. Signed-off-by: dblock <[email protected]> * Fix broken test. Signed-off-by: dblock <[email protected]> * Fixed TestBulk::test_bulk_works_with_bytestring_body. Signed-off-by: dblock <[email protected]> --------- Signed-off-by: dblock <[email protected]>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
import asyncio
|
||||
import uuid
|
||||
from typing import Any
|
||||
|
||||
from opensearchpy import AsyncHttpConnection, AsyncOpenSearch
|
||||
|
||||
@@ -22,7 +23,7 @@ index_name = "test-index-async"
|
||||
item_count = 100
|
||||
|
||||
|
||||
async def index_records(client, item_count) -> None:
|
||||
async def index_records(client: Any, item_count: int) -> None:
|
||||
await asyncio.gather(
|
||||
*[
|
||||
client.index(
|
||||
@@ -39,7 +40,7 @@ async def index_records(client, item_count) -> None:
|
||||
)
|
||||
|
||||
|
||||
async def test_async(client_count=1, item_count=1):
|
||||
async def test_async(client_count: int = 1, item_count: int = 1) -> None:
|
||||
clients = []
|
||||
for i in range(client_count):
|
||||
clients.append(
|
||||
|
||||
Reference in New Issue
Block a user