-
Notifications
You must be signed in to change notification settings - Fork 23
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
Warn for IO types like io.BytesIO #463
Comments
In my experience, if a stub is annotated with |
There's a large number of IO-related classes in the stdlib, and they all mean subtly different things; this can be pretty confusing. I think it's reasonable to have a lint flagging potential misuse of these, but there's an interesting question of how far we want to go here:
|
Does this solve a practical problem? Has someone actually used a |
🙋 We're in the process of adding types to https://github.com/python-pillow/Pillow and have inadvertently used |
No warnings are raised for this:
Instead of the concrete
io.BytesIO
, this should probably be something more specific for what exactly the file-like object actually does, or possibly eventyping.BinaryIO
.Similarly for other IO things.
Should flake8-pyi add some warnings in this area?
The text was updated successfully, but these errors were encountered: