Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mypy] Incorrect type for argument data to httpx.AsyncClient.request #133

Closed
dhruvmanila opened this issue Nov 7, 2020 · 1 comment · Fixed by #134
Closed

[mypy] Incorrect type for argument data to httpx.AsyncClient.request #133

dhruvmanila opened this issue Nov 7, 2020 · 1 comment · Fixed by #134
Labels

Comments

@dhruvmanila
Copy link
Contributor

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]"
@brettcannon
Copy link
Collaborator

https://www.python-httpx.org/api/ suggests the argument should be content, not data for httpx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants