Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on Broad Type Hints for Redis Client Methods #3421

Open
h3isenbug opened this issue Nov 2, 2024 · 0 comments
Open

Clarification on Broad Type Hints for Redis Client Methods #3421

h3isenbug opened this issue Nov 2, 2024 · 0 comments

Comments

@h3isenbug
Copy link

Version: 5.2.0
Platform: all of them
Description: Type hints seem way too broad, and I was wondering if there’s a specific reason for this or if it's simply an unresolved issue.

For example, the ping method on the synchronous Redis client only returns a boolean, but the type annotations are as follows:

ResponseT = Union[Awaitable[Any], Any]

    def ping(self, **kwargs) -> ResponseT:

I understand that the same type annotation is used for both synchronous and asynchronous implementations, but this confuses linters.

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant