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
Unexpected keyword argument "reject_bytes" for "dumps" #563
Comments
We don't provide stubs so wherever mypy gathers its information about which arguments each function takes, it's not here. |
Digging around, it's here you want to change. I suggest you make a pull request to typeshed. |
@bwoodsend thanks for investigating into it even if it was not a problem of the codebase :) I will look into opening a PR to typeshed |
I looked a bit into what it would take to ship stubs ourselves so we don't need to remember to send a PR to typeshed upon a release with API changes. To say it's a bit of a mess is probably an understatement. PEP 561 specifies how stubs should be shipped by packages, but it assumes (requires?) an actual Python package structure and isn't easily applied to a single-module extension. There's an open issue about this, too: python/typing#1061. The hack suggested there of having |
What did you do?
What did you expect to happen?
mypy to not complain about the new function
What actually happened?
mypy returned the following error:
Unexpected keyword argument "reject_bytes" for "dumps"
What versions are you using?
Please include code that reproduces the issue.
The best reproductions are self-contained scripts with minimal dependencies.
The text was updated successfully, but these errors were encountered: