-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
memoryview.cast("c") false error #8182
Comments
It looks to me that |
Yeah, this might be quite a big breaking change given that it's a builtin. |
@jdufresne Off-topic, but I skimmed the chardet PR you linked. The one nice thing the typeshed stubs for chardet do is distinguish between cases when ResultDict fields can be None or not. Might be worth seeing if there's something worth stealing from there (make sure to check latest typeshed stubs since there were some recent changes) |
Marking as deferred unless/until PEP 696 is accepted by the Steering Council and implemented by type checkers. |
See #11422 for the type var generics feature tracker. |
@srittau This can be closed out now. |
Given the following code snippet:
Inside the loop, the variable
c
is always typebytes
. However, mypy believes it to beint
and reports an error:Running the script confirms the type is bytes:
Docs on this method:
https://docs.python.org/3/library/stdtypes.html#memoryview.cast
The text was updated successfully, but these errors were encountered: