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

Check for protocol methods returning None #204

Open
srittau opened this issue Apr 15, 2022 · 1 comment
Open

Check for protocol methods returning None #204

srittau opened this issue Apr 15, 2022 · 1 comment

Comments

@srittau
Copy link
Collaborator

srittau commented Apr 15, 2022

This is actually not a stub-specific rule, but protocol methods returning None instead of object are suspect. None is meant as "The caller should not use the return value", but it actually means that any implementation must return None. (I remember we had this problem at least once. It might have been related to an ignored seek() return value.)

@Akuli
Copy link
Collaborator

Akuli commented Apr 15, 2022

We should probably check for Callable[something, None] as well.

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

No branches or pull requests

3 participants