Skip to content

Crossreferences to standard library in mypy docs, part 7 #7699

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

Merged
merged 3 commits into from
Oct 13, 2019

Conversation

hoefling
Copy link
Contributor

Added references to the protocols.rst. This is the last part of splitting up the changes in #7624 into more readable PRs.

Signed-off-by: Oleg Höfling <[email protected]>
``Iterable[T]``
---------------
:py:class:`Iterable[T] <typing.Iterable>`
-----------------------------------------
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please advise whether the refs in the section titles are useful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer not to have them (consistent with the earlier policy against code in titles. But then we need to edit the body text to include a ref, since it's still useful to have it.

Copy link
Contributor Author

@hoefling hoefling Oct 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a generic line like "See also ProtocolName documentation." to each section? The stdlib docs don't shed more light on protocol types TBH; PEP 544 is the information source if one needs details (and it's not even mentioned in the typing documentation!).

Or maybe a line like "The ProtocolName type is defined in typing module.", just to point out where the type can be imported from?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put a line like

See also :py:class:`Iterable`.

at the end of each section.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and it's not even mentioned in the typing documentation!)

It is in the relevant version (i.e. Python 3.8): https://docs.python.org/3.8/library/typing.html

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed the remote branch by accident, didn't mean to close this PR.

@hoefling hoefling closed this Oct 13, 2019
@hoefling hoefling deleted the stdlib-crossref-7 branch October 13, 2019 07:25
@hoefling hoefling restored the stdlib-crossref-7 branch October 13, 2019 07:26
@hoefling hoefling reopened this Oct 13, 2019
@gvanrossum gvanrossum merged commit 28a5853 into python:master Oct 13, 2019
@hoefling hoefling deleted the stdlib-crossref-7 branch October 23, 2019 21:46
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

Successfully merging this pull request may close these issues.

3 participants