Type annotations for attributes/properties are now rendered in red #236
-
Hello, Type annotations for attributes/properties used to be grey. Now they're red. I'm wondering if this is an intentional change or an accidental regression. I liked the grey :-) In case it helps, here's the rendered HTML: <dl class="py attribute">
<dt class="sig sig-object py" id="websockets.auth.BasicAuthWebSocketServerProtocol.username">
<span class="sig-name descname"><span class="pre">username</span></span><em class="property"><span class="pre">:</span> <span class="pre">Optional</span><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></em><em class="property"> <span class="pre">=</span> <span class="pre">None</span></em><a class="headerlink" href="#websockets.auth.BasicAuthWebSocketServerProtocol.username" title="Permalink to this definition">¶</a></dt>
<dd><p>Username of the authenticated user.</p>
</dd></dl> I can try to put together a minimal reproduction later. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Heyo! Got a code snippet that autodoc generates this with? |
Beta Was this translation helpful? Give feedback.
-
This example should allow you to reproduce. myproject/stuff.py from typing import Optional
class Authenticator:
"""I authenticate users."""
username: Optional[str] = None
"""Username of the authenticated user.""" myproject/docs/index.rst .. automodule:: myproject.stuff
.. autoclass:: Authenticator
.. autoattribute:: username Sorry for not providing this earlier — I was in the middle of a large PR. By the way, thanks for Furo, I like it a lot and it motivated me to give websockets' docs some love :-) |
Beta Was this translation helpful? Give feedback.
-
Fixed in https://pradyunsg.me/furo/changelog/#cavalier-canary! |
Beta Was this translation helpful? Give feedback.
Fixed in https://pradyunsg.me/furo/changelog/#cavalier-canary!