Uh oh!
There was an error while loading. Please reload this page.
Added type annotation for tests/client/test_async_client.py - #985
Conversation
florimondmanca
commented
May 23, 2020
Hey, thanks for this! Definitely useful to expand our type coverage in tests to discover oddities like this.
I think it’s yet another case of « Dict is invariant in values », so the Union’s in the values make mypy say « I see those are TL;DR I think we’d need to update the |
florimondmanca
commented
May 23, 2020
As for…
Yes I think it makes sense to |
c193460 to
86e6290Comparehramezani
commented
May 23, 2020
Thanks @florimondmanca, I changed the |
florimondmanca
left a comment
There was a problem hiding this comment.
Thanks! A few more thoughts from me. Might take a look at the preliminary work I'm mentioning below. :-)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hramezani
commented
May 24, 2020
@florimondmanca I will wait for #991 and #993 to be merged and then I can rebase this PR. |
86e6290 to
1196772Compare37359b8 to
9356502Comparehramezani
commented
May 27, 2020
@florimondmanca, I rebased it. we just have one error in |
Refs https://github.com/encode/httpx/issues/650
We have still 3 issues in this file:
In above two test we defined headers like:
headers = {"Custom-header": "value"}headers = {"Expect": "100-continue"}which have type
Dict[str, str]and I think they are valid type based on HeaderTypes definition. we can fix them by replacing them by List of Tuples likeheaders = [("Expect", "100-continue")]. TBH, can not figure out why they are incompatible.What should we do with this error 🤔? Shall we ignore checking for this line?
I don't have much experience in type annotation, that's why I am asking this questions.