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 — json: improve bytes handling by sobolevn · Pull Request #9042 · python/typeshed Conversation
|
|
Diff from mypy_primer, showing the effect of this PR on open source code: optuna (https://github.com/optuna/optuna) - optuna/storages/_rdb/storage.py:388: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes]" + optuna/storages/_rdb/storage.py:388: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes, bytearray]" - optuna/storages/_rdb/storage.py:398: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes]" + optuna/storages/_rdb/storage.py:398: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes, bytearray]" - optuna/storages/_rdb/storage.py:409: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes]" + optuna/storages/_rdb/storage.py:409: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes, bytearray]" - optuna/storages/_rdb/storage.py:420: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes]" + optuna/storages/_rdb/storage.py:420: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes, bytearray]" - optuna/storages/_rdb/storage.py:454: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes]" + optuna/storages/_rdb/storage.py:454: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes, bytearray]" - optuna/storages/_rdb/storage.py:455: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes]" + optuna/storages/_rdb/storage.py:455: error: Argument 1 to "loads" has incompatible type "Column"; expected "Union[str, bytes, bytearray]" |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
loads explicitly checks for str | bytes | bytearray. detect_encoding does .startswith which doesn't exist on any other well-known buffer type.
Sorry, something went wrong.
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.
There was an error while loading. Please reload this page.