[mypy] Incorrect type for argument `data` to `httpx.AsyncClient.request`
dhruvmanila opened this issue · comments
Dhruv Manilawala commented
Incorrect annotation for argument data
to httpx.AsyncClient.request
as referenced in #74 (comment)
Location in the module: gidgethub/httpx.py::GitHubAPI::_request(body: bytes = b"")
Reference:
httpx
client module: https://github.com/encode/httpx/blob/master/httpx/_client.py#L1334
Type source: https://github.com/encode/httpx/blob/master/httpx/_types.py#L73
gidgethub/httpx.py:19: error: Argument "data" to "request" of "AsyncClient" has incompatible type "bytes"; expected "Dict[Any, Any]"
Brett Cannon commented
https://www.python-httpx.org/api/ suggests the argument should be content
, not data
for httpx.