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

zlib.crc32() reports that it's first parameter is incompatible with array.array() #2611

Closed
xNinjaKittyx opened this issue Nov 20, 2018 · 3 comments · Fixed by #3904
Closed
Labels
stubs: false positive Type checkers report false errors

Comments

@xNinjaKittyx
Copy link

xNinjaKittyx commented Nov 20, 2018

From MyPy
error: Argument 1 to "crc32" has incompatible type "array[Any]"; expected "bytes"

This function does work with array.array() objects, so I assume its a bug?

@srittau
Copy link
Collaborator

srittau commented Nov 20, 2018

Relevant: python/typing#593.

@srittau srittau added stubs: false positive Type checkers report false errors size-small labels Nov 20, 2018
@djb4ai
Copy link
Contributor

djb4ai commented Apr 3, 2020

@srittau as a type for buffer protocol is not available, should I just put array.array[Any]? Solves the problem for now.

@JelleZijlstra
Copy link
Member

That should be fine yes. Ideally the Any should be something more specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: false positive Type checkers report false errors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants