treq
treq copied to clipboard
treq should define an augmented response interface, not document private (???) concrete _Response class
The documentation currently documents _Response, which raises the question of what that underscore prefix is doing there exactly.
Instead, we should define a treq.itreq.IHelpfulResponse (better name pending) which documents all the extra attributes and is a sub-interface of Agent's IResponse, then document that rather than _Response itself. (Needless to say, _Response should then implement said interface.)
This would make it possible to write correct type annotations when https://github.com/Shoobx/mypy-zope has been updated to work with the latest mypy.
(cc @twm since this seems to be in his area of interest)