Skip to content

Commit b0b3983

Browse files
author
Zixin Yao
committed
update
1 parent 1e9822b commit b0b3983

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

sdk/search/azure-search-documents/azure/search/documents/indexes/_generated/models/_models_py3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8838,7 +8838,7 @@ def __init__(
88388838
*,
88398839
name: str,
88408840
lower_case_terms: bool = True,
8841-
pattern: str = "\W+",
8841+
pattern: str = r"\W+",
88428842
flags: Optional[Union[str, "_models.RegexFlags"]] = None,
88438843
stopwords: Optional[list[str]] = None,
88448844
**kwargs: Any
@@ -9063,7 +9063,7 @@ def __init__(
90639063
self,
90649064
*,
90659065
name: str,
9066-
pattern: str = "\W+",
9066+
pattern: str = r"\W+",
90679067
flags: Optional[Union[str, "_models.RegexFlags"]] = None,
90689068
group: int = -1,
90699069
**kwargs: Any

sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,17 @@ class EntityRecognitionSkill(SearchIndexerSkill):
246246
:vartype default_language_code: str or
247247
~azure.search.documents.indexes.models.EntityRecognitionSkillLanguage
248248
:ivar include_typeless_entities: Determines whether or not to include entities which are well
249-
known but don't conform to a pre-defined type. If this configuration is not set (default), set
250-
to null or set to false, entities which don't conform to one of the pre-defined types will not
251-
be surfaced.
249+
known but don't conform to a pre-defined type. If this configuration is not set (default), set
250+
to null or set to false, entities which don't conform to one of the pre-defined types will not
251+
be surfaced.
252252
:vartype include_typeless_entities: bool
253253
:ivar minimum_precision: A value between 0 and 1 that be used to only include entities whose
254254
confidence score is greater than the value specified. If not set (default), or if explicitly
255255
set to null, all entities will be included.
256256
:vartype minimum_precision: float
257257
:ivar model_version: The version of the model to use when calling the Text Analytics service.
258-
It will default to the latest available when not specified. We recommend you do not specify
259-
this value unless absolutely necessary.
258+
It will default to the latest available when not specified. We recommend you do not specify
259+
this value unless absolutely necessary.
260260
:vartype model_version: str
261261
:ivar skill_version: The version of the skill to use when calling the Text Analytics service.
262262
It will default to V1 when not specified.

sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_async.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,23 @@ def await_prepared_test(test_fn):
2323
@functools.wraps(test_fn)
2424
def run(test_class_instance, *args, **kwargs):
2525
trim_kwargs_from_test_function(test_fn, kwargs)
26-
loop = asyncio.get_event_loop()
27-
return loop.run_until_complete(test_fn(test_class_instance, **kwargs))
26+
27+
try:
28+
loop = asyncio.get_running_loop()
29+
except RuntimeError:
30+
loop = asyncio.new_event_loop()
31+
asyncio.set_event_loop(loop)
32+
owns_loop = True
33+
else:
34+
owns_loop = False
35+
36+
try:
37+
return loop.run_until_complete(test_fn(test_class_instance, **kwargs))
38+
finally:
39+
if owns_loop:
40+
loop.run_until_complete(loop.shutdown_asyncgens())
41+
loop.close()
42+
asyncio.set_event_loop(None)
2843

2944
return run
3045

0 commit comments

Comments
 (0)