Repository navigation
Intersphinx: resolve type-check failures in inventory loading module - #12879
Merged
Merged
Conversation
jayaddison
reviewed
Sep 10, 2024
jayaddison
approved these changes
Sep 11, 2024
Contributor
|
@khanxmetu please could you add an entry to the |
…pe into a protocol
jayaddison
approved these changes
Sep 11, 2024
Member
|
Thanks @khanxmetu! A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature or Bugfix
Purpose
Detail
Incompatible return value type (got "HTTPResponse | Any", expected "IO[Any]") [return-value]. This is due tourllib3.response.HTTPResponsereturned byrequests.Response().rawnot conforming toio.BytesIO. Although the docs state that the object follows the file-like behavior, however due to its inheritence structure it is not possible to cast totyping.IO. Moreover following the ideas from What are `typing.IO`, `TextIO`, and `BinaryIO` good for? python/typing#829 (comment), we should avoid objects typed astyping.IOand use protocols instead. Therefore aReadableStreamprotocol is created.Cannot assign to a method [method-assign]. Assigning boolean tourllib3.response.HTTPResponse.decode_contentworks. Streaming gzipped responses psf/requests#2155 (comment)Relates