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

treq should define an augmented response interface, not document private (???) concrete _Response class #245

Open
glyph opened this issue Jun 5, 2019 · 1 comment

Comments

@glyph
Copy link
Member

glyph commented Jun 5, 2019

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.

@glyph
Copy link
Member Author

glyph commented Jun 5, 2019

(cc @twm since this seems to be in his area of interest)

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

No branches or pull requests

1 participant