Skip to content

Commit

Permalink
Fix a typing warning from mypy involving httpx (#125)
Browse files Browse the repository at this point in the history
Co-authored-by: Casey <casey.duquette@snapchat.com>
  • Loading branch information
brettcannon and caseyduquettesc committed Jun 4, 2020
1 parent d9eae33 commit b236be1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions gidgethub/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ async def _request(
) -> Tuple[int, Mapping[str, str], bytes]:
"""Make an HTTP request."""
response = await self._client.request(
method,
url,
# Reason: see discussion at https://github.com/brettcannon/gidgethub/pull/122#issuecomment-633738024.
# httpx 0.13.1 updated the HeaderTypes and it is acting invariant, causing our Mapping[str, str] to be
# technically incompatible with their Mapping[Union[str, bytes], Union[str, bytes]].
headers=dict(headers), # type: ignore
data=body,
method, url, headers=dict(headers), data=body
)
return response.status_code, response.headers, response.content

Expand Down

0 comments on commit b236be1

Please sign in to comment.