Assignment from no return (#658)
* added unnecessary-dunder-call to pylintrc files; disabled for certain lines in run_tests.py, exception thrown by 'git remote add origin' when the remote already exists will not exit Signed-off-by: Mark Cohen <markcoh@amazon.com> * updates to adhere to assignment-from-no-return lint Signed-off-by: Mark Cohen <markcoh@amazon.com> * simplified get_value_filter in Facet to return None added assert to test get_value_filter returning None Signed-off-by: Mark Cohen <markcoh@amazon.com> * added option to output HTML test coverage locally from run_tests.py returning None from test_faceted_search.Facet.get_value_filter Signed-off-by: Mark Cohen <markcoh@amazon.com> * added unused-variable lints; replaced unused variables with _ or referenced them Signed-off-by: Mark Cohen <markcoh@amazon.com> * updated CHANGELOG to point to the right PR Signed-off-by: Mark Cohen <markcoh@amazon.com> --------- Signed-off-by: Mark Cohen <markcoh@amazon.com>
This commit is contained in:
@@ -23,7 +23,7 @@ from opensearchpy import OpenSearch
|
||||
def get_info(client: Any, request_count: int) -> float:
|
||||
"""get info from client"""
|
||||
total_time: float = 0
|
||||
for request in range(request_count):
|
||||
for _ in range(request_count):
|
||||
start = time.time() * 1000
|
||||
client.info()
|
||||
total_time += time.time() * 1000 - start
|
||||
@@ -49,7 +49,7 @@ def test(thread_count: int = 1, request_count: int = 1, client_count: int = 1) -
|
||||
root.addHandler(handler)
|
||||
|
||||
clients = []
|
||||
for i in range(client_count):
|
||||
for _ in range(client_count):
|
||||
clients.append(
|
||||
OpenSearch(
|
||||
hosts=[{"host": host, "port": port}],
|
||||
|
||||
@@ -24,7 +24,7 @@ from opensearchpy import OpenSearch, Urllib3HttpConnection
|
||||
def index_records(client: Any, index_name: str, item_count: int) -> Any:
|
||||
"""bulk index item_count records into index_name"""
|
||||
total_time = 0
|
||||
for iteration in range(10):
|
||||
for _ in range(10):
|
||||
data: Any = []
|
||||
for item in range(item_count):
|
||||
data.append(
|
||||
@@ -68,7 +68,7 @@ def test(thread_count: int = 1, item_count: int = 1, client_count: int = 1) -> N
|
||||
root.addHandler(handler)
|
||||
|
||||
clients = []
|
||||
for i in range(client_count):
|
||||
for _ in range(client_count):
|
||||
clients.append(
|
||||
OpenSearch(
|
||||
hosts=[{"host": host, "port": port}],
|
||||
|
||||
Reference in New Issue
Block a user