Skip to content

Commit f0ef29b

Browse files
committed
updates
1 parent 1d1a018 commit f0ef29b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def get_index(self, name: str, **kwargs: Any) -> Optional[SearchIndex]:
153153
"""
154154
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
155155
result = self._client.indexes.get(name, **kwargs)
156-
return SearchIndex._from_generated(result)
156+
return SearchIndex._from_generated(result) # pylint:disable=protected-access
157157

158158
@distributed_trace
159159
def get_index_statistics(self, index_name: str, **kwargs: Any) -> MutableMapping[str, Any]:
@@ -228,7 +228,7 @@ def create_index(self, index: SearchIndex, **kwargs: Any) -> SearchIndex:
228228
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
229229
patched_index = index._to_generated() # pylint:disable=protected-access
230230
result = self._client.indexes.create(patched_index, **kwargs)
231-
return cast(SearchIndex, SearchIndex._from_generated(result))
231+
return cast(SearchIndex, SearchIndex._from_generated(result)) # pylint:disable=protected-access
232232

233233
@distributed_trace
234234
def create_or_update_index(
@@ -280,7 +280,7 @@ def create_or_update_index(
280280
error_map=error_map,
281281
**kwargs
282282
)
283-
return cast(SearchIndex, SearchIndex._from_generated(result))
283+
return cast(SearchIndex, SearchIndex._from_generated(result)) # pylint:disable=protected-access
284284

285285
@distributed_trace
286286
def analyze_text(self, index_name: str, analyze_request: AnalyzeTextOptions, **kwargs: Any) -> AnalyzeResult:
@@ -437,7 +437,7 @@ def create_synonym_map(self, synonym_map: SynonymMap, **kwargs: Any) -> SynonymM
437437
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
438438
patched_synonym_map = synonym_map._to_generated() # pylint:disable=protected-access
439439
result = self._client.synonym_maps.create(patched_synonym_map, **kwargs)
440-
return cast(SynonymMap, SynonymMap._from_generated(result))
440+
return cast(SynonymMap, SynonymMap._from_generated(result)) # pylint:disable=protected-access
441441

442442
@distributed_trace
443443
def create_or_update_synonym_map(
@@ -469,7 +469,7 @@ def create_or_update_synonym_map(
469469
error_map=error_map,
470470
**kwargs
471471
)
472-
return cast(SynonymMap, SynonymMap._from_generated(result))
472+
return cast(SynonymMap, SynonymMap._from_generated(result)) # pylint:disable=protected-access
473473

474474
@distributed_trace
475475
def get_service_statistics(self, **kwargs: Any) -> MutableMapping[str, Any]:

sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async def create_index(self, index: SearchIndex, **kwargs: Any) -> SearchIndex:
225225
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
226226
patched_index = index._to_generated() # pylint:disable=protected-access
227227
result = await self._client.indexes.create(patched_index, **kwargs)
228-
return cast(SearchIndex, SearchIndex._from_generated(result))
228+
return cast(SearchIndex, SearchIndex._from_generated(result)) # pylint:disable=protected-access
229229

230230
@distributed_trace_async
231231
async def create_or_update_index(
@@ -277,7 +277,7 @@ async def create_or_update_index(
277277
error_map=error_map,
278278
**kwargs
279279
)
280-
return cast(SearchIndex, SearchIndex._from_generated(result))
280+
return cast(SearchIndex, SearchIndex._from_generated(result)) # pylint:disable=protected-access
281281

282282
@distributed_trace_async
283283
async def analyze_text(self, index_name: str, analyze_request: AnalyzeTextOptions, **kwargs: Any) -> AnalyzeResult:
@@ -434,7 +434,7 @@ async def create_synonym_map(self, synonym_map: SynonymMap, **kwargs: Any) -> Sy
434434
kwargs["headers"] = self._merge_client_headers(kwargs.get("headers"))
435435
patched_synonym_map = synonym_map._to_generated() # pylint:disable=protected-access
436436
result = await self._client.synonym_maps.create(patched_synonym_map, **kwargs)
437-
return cast(SynonymMap, SynonymMap._from_generated(result))
437+
return cast(SynonymMap, SynonymMap._from_generated(result)) # pylint:disable=protected-access
438438

439439
@distributed_trace_async
440440
async def create_or_update_synonym_map(
@@ -465,7 +465,7 @@ async def create_or_update_synonym_map(
465465
error_map=error_map,
466466
**kwargs
467467
)
468-
return cast(SynonymMap, SynonymMap._from_generated(result))
468+
return cast(SynonymMap, SynonymMap._from_generated(result)) # pylint:disable=protected-access
469469

470470
@distributed_trace_async
471471
async def get_service_statistics(self, **kwargs) -> MutableMapping[str, Any]:

0 commit comments

Comments
 (0)