Opened 87 minutes ago
#36591 new Cleanup/optimization
Remove unnecessary dotted paths in email docs
Reported by: | Mike Edmunds | Owned by: | |
---|---|---|---|
Component: | Uncategorized | Version: | 5.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In docs/topics/email.txt, there are several references like this:
... :class:`~django.core.mail.EmailMessage` ...
But throughout that file, django.core.mail
is the default module (due to the module:: django.core.mail
directive at the top). This has exactly the same meaning, and is shorter (which would improve wrapping):
... :class:`EmailMessage` ...
The full dotted path is only necessary when you specifically want it to appear in the generated docs. And starting a reference with ~
character means "omit the full dotted path—just show the last component."
(Also applies to :func:
and :meth:
and any other inline Sphinx roles in email.txt. We could probably just remove~django.core.mail.
—with the leading ~
—throughout that file.)