Skip to content

docs: add module docstring to httpx/__init__.py and class docstrings to Request and Response - #3864

Open
Mehmetbaruk wants to merge 2 commits into
encode:masterfrom
Mehmetbaruk:docs/public-module-model-docstrings
Open

Mehmetbaruk wants to merge 2 commits into
encode:masterfrom
Mehmetbaruk:docs/public-module-model-docstrings

Conversation

@Mehmetbaruk

Copy link
Copy Markdown

Summary

Refs #3355.

Basically, I solved the missing editor hover docs for the top-level package and core HTTP models by adding a short module docstring to httpx/__init__.py and concise class docstrings to Request and Response in httpx/_models.py. Now hovering over httpx, httpx.Request, or httpx.Response in an IDE immediately shows what they are and a quick usage example.

Also adds test_public_docstrings() in tests/test_exported_members.py to keep those docstrings covered. Verified against master (7cff5f7) with model and exported-member tests passing locally.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant