opensearch-project / opensearch-py

Python Client for OpenSearch
https://opensearch.org/docs/latest/clients/python/
Apache License 2.0
359 stars 178 forks source link

Fix: don't hardcode client class name. #555

Closed dblock closed 1 year ago

dblock commented 1 year ago

Description

The generator copies then patches all async class names to be sync, but it doesn't know how to patch a string inside a warning message. This avoids the problem and adds a test for the correct warning message.

Issues Resolved

https://github.com/opensearch-project/opensearch-py/pull/553/files#r1373341397

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

codecov[bot] commented 1 year ago

Codecov Report

Merging #555 (6984b89) into main (17794ba) will increase coverage by 0.01%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #555      +/-   ##
==========================================
+ Coverage   71.09%   71.10%   +0.01%     
==========================================
  Files          85       85              
  Lines        7774     7774              
==========================================
+ Hits         5527     5528       +1     
+ Misses       2247     2246       -1     
Files Coverage Δ
opensearchpy/_async/client/plugins.py 93.75% <ø> (ø)
opensearchpy/client/plugins.py 100.00% <ø> (+6.25%) :arrow_up: