opensearch-project / opensearch-py

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

[PROPOSAL] Assignment from no return in faceted_search.py #656

Open macohen opened 8 months ago

macohen commented 8 months ago

What/Why

What are you proposing?

I was working on adding the "assignment-from-no-return" lint: https://pylint.readthedocs.io/en/latest/user_guide/messages/error/assignment-from-no-return.html. There's only one occurrence of it and it is in opensearchpy/helpers/faceted_search.py. The get_value_filter function passes, but it is called in add_filter. I think one right way to deal with this is to use the abstractmethod annotation on get_value_filter.

@saimedhi, I can create a PR if this makes sense to you

What problems are you trying to solve?

Be more pythonic

What is the developer experience going to be?

After the assignment-from-no-return lint is added, any functions do not return anything, but are called and assigned to a value will be caught in pylint

Are there any security considerations?

No

Are there any breaking changes to the API

No

What is the user experience going to be?

N/A

Are there breaking changes to the User Experience?

No

Why should it be built? Any reason not to?

If it is acceptable to not use this lint for a reason, then it should not be integrated.

What will it take to execute?

Just a quick PR I can pick up.