You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It improves our upfront knowledge about how users will actually use HTTPX — currently their usage of type hints in the wild is not reflected anywhere.
It helps us catch type hint inconsistencies we wouldn't see in the core package.
The main counter-argument, I suppose, is that type hinting tests is tedious. I think that's fair, but I believe the two pro's above make it compelling.
I think this is a great idea, would like to work on this. Since I am pretty new to httpx, adding these type hints to the tests will give me a better picture of how httpx works under the hood.
I think there’s one small last step which would be to add tests/ to the mypy arguments in the check script. :-) Once this is enforced then yup, we can close this off.
I am currently working on a different Good First Issue PR and when that is done. I would be happy to pick up what's remaining in this PR so we can close this one too. 😄
Activity
florimondmanca commentedon Dec 19, 2019
Alternatively, we could tweak the
mypyconfig:Running this locally raises 141 errors, but mostly on internal APIs, so, hmm.
aalvrz commentedon Dec 23, 2019
I think this is a great idea, would like to work on this. Since I am pretty new to httpx, adding these type hints to the tests will give me a better picture of how httpx works under the hood.
florimondmanca commentedon Mar 13, 2020
I think this is still a good idea, though it's a bit of busy work to upgrade our existing test code.
Let's perhaps just remind ourselves to add types whenever we add/touch existing tests?
Pradhvan commentedon Jun 17, 2020
@florimondmanca I see a lot of merged PR. I guess you should close this ? 😄
florimondmanca commentedon Jun 17, 2020
I think there’s one small last step which would be to add tests/ to the mypy arguments in the check script. :-) Once this is enforced then yup, we can close this off.
Pradhvan commentedon Jun 18, 2020
I am currently working on a different Good First Issue PR and when that is done. I would be happy to pick up what's remaining in this PR so we can close this one too. 😄