зеркало из https://github.com/mozilla/MozDef.git
Fix type signature of query.wrapper
This commit is contained in:
Родитель
bdda134a1b
Коммит
aef4e094ab
|
@ -1,7 +1,7 @@
|
|||
'''To make GeoModel code more testable, we abstract interaction with
|
||||
ElasticSearch away via a "query interface". This is just a function that,
|
||||
called with a list of ES indices and a `SearchQuery`, produces a list of
|
||||
dictionaries as output.
|
||||
called with an ES index and a `SearchQuery`, produces a list of dictionaries
|
||||
as output.
|
||||
'''
|
||||
|
||||
from typing import Any, Callable, Dict, List
|
||||
|
@ -10,7 +10,7 @@ from mozdef_util.elasticsearch_client import ElasticsearchClient as ESClient
|
|||
from mozdef_util.query_models import SearchQuery
|
||||
|
||||
|
||||
QueryInterface = Callable[[SearchQuery, List[str]], List[Dict[str, Any]]]
|
||||
QueryInterface = Callable[[SearchQuery, str], List[Dict[str, Any]]]
|
||||
|
||||
|
||||
def wrap(client: ESClient) -> QueryInterface:
|
||||
|
|
Загрузка…
Ссылка в новой задаче