I want to document Python object attributes with Sphinx. I understand I should use
:ivar varname: description :ivar type varname: description
Here is a workaround provided by @acrisci on github: prefix your variable name with ~.. For example replace
@acrisci
~.
:ivar float bandwidth: blah
with this:
:ivar float ~.bandwidth: blah
Source: https://github.com/sphinx-doc/sphinx/issues/2549#issuecomment-488896939