Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

Documentation of FormView.form_class produces warning #1

Closed
timobrembeck opened this issue Nov 25, 2020 · 1 comment
Closed

Documentation of FormView.form_class produces warning #1

timobrembeck opened this issue Nov 25, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@timobrembeck
Copy link
Owner

The documentation of the attribute form_class in views which inherit from Django's FormView produces the following warning when executing sphinx-build:

WARNING: :1: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.

It took me a while to figure out what the problem is, because there is no reference to the source code which produced this warning.
Looking at the verbose debug output of sphinx-build, I noticed the following:

   .. py:attribute:: CustomView.form_class
      :module: app.views

      Docstring for this attribute

      **Form fields:**

      * ``field1``: Field1 (:class:`~django.forms.fields.CharField`)
      alias of :class:`CustomForm`

So the form fields are appended to the docstring by sphinxcontrib-django and the "alias" is appended because the value of the field in a class. The missing new line between the bullet list and the "alias"-line causes the warning.

@timobrembeck timobrembeck added the bug Something isn't working label Nov 25, 2020
@timobrembeck timobrembeck self-assigned this Nov 25, 2020
@timobrembeck
Copy link
Owner Author

This was not a problem of this extension, but of Sphinx itself and was fixed in version 3.3.0: sphinx-doc/sphinx#8190

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant