Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#26233 closed Uncategorized (fixed)

docstring of django.db.models.Q causes warning when building Sphinx docs for my project

Reported by: Luc Saffre Owned by: nobody
Component: Documentation Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

When I write

from django.db.models import Q

in my code, then I get a Sphinx warning when building the docs for my project. This is partly due to the fact that Sphinx's autodoc inserts the docstring of Django's Q class into my API doc. But the more obvious problem is that this docstring contains invalid reStructuredText content. The docstring is:

    Encapsulates filters as objects that can then be combined logically (using
    & and |).

Correct syntax must be::

    Encapsulates filters as objects that can then be combined logically (using
    `&` and `|`).

Attachments (1)

26233.diff (425 bytes ) - added by Luc Saffre 9 years ago.
output of git diff

Download all attachments as: .zip

Change History (4)

by Luc Saffre, 9 years ago

Attachment: 26233.diff added

output of git diff

comment:1 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 70d3f81c:

Fixed #26233 -- Fixed invalid reSt in models.Q docstring.

comment:2 by Tim Graham <timograham@…>, 9 years ago

In 33525bb1:

[1.8.x] Fixed #26233 -- Fixed invalid reSt in models.Q docstring.

Backport of 70d3f81ca4ea7e1e1310e13ce0a633d7f920d45b from master

comment:3 by Tim Graham <timograham@…>, 9 years ago

In 2afbc6b7:

[1.9.x] Fixed #26233 -- Fixed invalid reSt in models.Q docstring.

Backport of 70d3f81ca4ea7e1e1310e13ce0a633d7f920d45b from master

Note: See TracTickets for help on using tickets.
Back to Top