Skip to content

Turn --disallow-any-generics on when checking stubs with mypy #3267

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

Closed
ilevkivskyi opened this issue Sep 26, 2019 · 6 comments · Fixed by #3288
Closed

Turn --disallow-any-generics on when checking stubs with mypy #3267

ilevkivskyi opened this issue Sep 26, 2019 · 6 comments · Fixed by #3288
Labels
stubs: improvement Improve/refactor existing annotations, other stubs issues

Comments

@ilevkivskyi
Copy link
Member

I have noticed several people recently forgot to specify type arguments. Should we try enforcing this?

@gvanrossum
Copy link
Member

+1, assuming we don't have to fix 100s of places...

@srittau
Copy link
Collaborator

srittau commented Sep 26, 2019

More strictness is a good thing for typeshed, in my opinion.

@ilevkivskyi
Copy link
Member Author

I actually just tried this and it causes around 400 errors. On one hand this is not too many to do this in general, on other hand it is probably too many to do this right now.

@srittau srittau added size-large stubs: improvement Improve/refactor existing annotations, other stubs issues labels Sep 27, 2019
@gvanrossum
Copy link
Member

gvanrossum commented Sep 27, 2019 via email

@ilevkivskyi
Copy link
Member Author

Could we incrementally fix those errors? Even if some more of the same type of errors appear it would be less work to fix the final batch.

This is a good idea. @srittau what do you think about splitting the work, will you have time/energy? Also maybe @JelleZijlstra ?

@srittau
Copy link
Collaborator

srittau commented Sep 28, 2019

Good idea indeed. I'll look into it tomorrow.

srittau added a commit to srittau/typeshed that referenced this issue Sep 29, 2019
Part of python#3267. Together with python#3276 this should fix all such problems.
gvanrossum pushed a commit that referenced this issue Sep 29, 2019
JelleZijlstra pushed a commit that referenced this issue Sep 30, 2019
Part of #3267. Together with #3276 this should fix all such problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: improvement Improve/refactor existing annotations, other stubs issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants