twisted / treq

Python requests like API built on top of Twisted's HTTP client.
Other
585 stars 137 forks source link

MyPy failure due to CookieAgent type annotations #384

Closed twm closed 2 months ago

twm commented 2 months ago

It looks like the type annotations introduced in twisted/twisted#12045 are causing MyPy checks to fail:

src/treq/client.py:258:58: error: Argument 2 to "CookieAgent" has incompatible type "Union[CookieJar, Mapping[str, str], None]"; expected "CookieJar"  [arg-type]
adiroiban commented 2 months ago

Thanks for the report... maybe we can run some mypy test on treq trunk, as part of twisted/twisted CI ?

I hope that this will avoid such errors.

Maybe another reason to merge twisted/treq into twisted/twisted :p