Add stubs for httpretty#16048
Open
adamtheturtle wants to merge 9 commits into
Open
Conversation
adamtheturtle
marked this pull request as ready for review
July 20, 2026 13:29
This comment has been minimized.
This comment has been minimized.
donbarbos
reviewed
Jul 20, 2026
donbarbos
left a comment
Contributor
There was a problem hiding this comment.
Thank you! I noted a few moments:
| @property | ||
| def host(self) -> str: ... | ||
| def parse_querystring(self, qs: str) -> dict[str, list[str]]: ... | ||
| def parse_request_body(self, body: str) -> Any: ... |
Contributor
There was a problem hiding this comment.
Let's add some explanatory comments:
Suggested change
| def parse_request_body(self, body: str) -> Any: ... | |
| def parse_request_body(self, body: str) -> Any: ... # Any object can be returned if deserialization is successful |
| @@ -0,0 +1 @@ | |||
| version: str | |||
Contributor
There was a problem hiding this comment.
Suggested change
| version: str | |
| from typing import Final | |
| version: Final[str] |
| encoding: str = "utf-8", | ||
| verbose: bool = False, | ||
| allow_net_connect: bool = True, | ||
| pool_manager_params: Mapping[str, Any] | None = None, |
Contributor
There was a problem hiding this comment.
Another explanatory comment:
Suggested change
| pool_manager_params: Mapping[str, Any] | None = None, | |
| # Passed to urllib3.PoolManager as kwargs, and connection pool's parameters have various types | |
| pool_manager_params: Mapping[str, Any] | None = None, |
| ) | ||
| from .errors import HTTPrettyError as HTTPrettyError, UnmockedError as UnmockedError | ||
|
|
||
| __version__: str |
Contributor
There was a problem hiding this comment.
Suggested change
| __version__: str | |
| __version__: Final[str] |
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds type stubs for HTTPretty 1.1.4.
Related: #16047.