-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Crossreferences to standard library in mypy docs #7652
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
Conversation
Signed-off-by: Oleg Höfling <[email protected]>
Signed-off-by: Oleg Höfling <[email protected]>
Signed-off-by: Oleg Höfling <[email protected]>
Signed-off-by: Oleg Höfling <[email protected]>
Signed-off-by: Oleg Höfling <[email protected]>
4588851
to
a79852e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just two actionable nits.
docs/source/additional_features.rst
Outdated
have imprecise (too permissive) types. This will be fixed in future releases. | ||
|
||
Mypy does not yet recognize aliases of ``dataclasses.dataclass``, and will | ||
Mypy does not yet recognize aliases of :py:func:`dataclasses.dataclass`, and will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one causes is a regression in rendering IMO. The :py:func:
version gets rendered with a trailing ()
pair, while the original gets rendered without it. Since an alias to a function does not involve calling it, IMO it should be rendered without ()
. (Maybe one of the other :py:
things link the same way but render without ()
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dang, missed that. Sure, the proper ref here would be
:py:func:`dataclasses.dataclass <dataclasses.dataclass>`
Will fix that!
…in command_line.rst Signed-off-by: Oleg Höfling <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG! Will merge.
BTW What does the ~
in ~typing.Optional
do?
The tilde removes the dotted path in the rendered text. E.g.
will render as
will render as just |
This adds crossrefs to the docs, a follow-up of #7652 (crossrefs to standard library items) and #7784 (crossrefs for command line options), only now for the config file values. Signed-off-by: Oleg Höfling <[email protected]>
Added references to the following documents:
additional_features.rst
casts.rst
class_basics.rst
command_line.rst
This is part of splitting up the changes in #7624 into more readable PRs.