Skip to content

Commit

Permalink
Update _client.py (#2247)
Browse files Browse the repository at this point in the history
Update the type annotation for the default_encoding parameter of AsyncClient's initializer to accept a callable of the form (bytes) -> str.
  • Loading branch information
willfrey committed May 26, 2022
1 parent 89cdd90 commit 5b06aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httpx/_client.py
Expand Up @@ -1363,7 +1363,7 @@ def __init__(
transport: typing.Optional[AsyncBaseTransport] = None,
app: typing.Optional[typing.Callable] = None,
trust_env: bool = True,
default_encoding: str = "utf-8",
default_encoding: typing.Union[str, typing.Callable[[bytes], str]] = "utf-8",
):
super().__init__(
auth=auth,
Expand Down

0 comments on commit 5b06aea

Please sign in to comment.