GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — Allow keyword errors for UTF-8 decoders by jw9829 · Pull Request #16447 · python/typeshed Conversation
|
| @type_check_only | ||
| class _Decoder(Protocol): | ||
| def __call__(self, input: ReadableBuffer, errors: str = ..., /) -> tuple[str, int]: ... # signature of Codec().decode | ||
| def __call__(self, input: ReadableBuffer, /, errors: str = ...) -> tuple[str, int]: ... # signature of Codec().decode |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is not correct for all codecs:
>>> codecs.lookup("ascii").decode(b"abc", errors="replace")
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
codecs.lookup("ascii").decode(b"abc", errors="replace")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: _codecs.ascii_decode() takes no keyword arguments
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
false alarm on decode call
There was an error while loading. Please reload this page.