You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a CSS rule causing type hints that appear in the documentation of class attributes (such as those created by @dataclasses.dataclass) to be all upper-cased. I'm not certain which exact objects this is intending to capitalise, but type-hints should probably be exempt, since they're Python objects that are case-sensitive if people want to look them up / import them.
For example, on this page for an algorithms dataclass, the attributes are given all in uppercase. The Sphinx-generated HTML for a single attribute is (linebreaks inserted):
<dtclass="sig sig-object py" id="qiskit.algorithms.optimizers.OptimizerState.x"><spanclass="sig-name descname"><spanclass="pre">x</span></span><emclass="property"><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="pre">Union</span><spanclass="p"><spanclass="pre">[</span></span><spanclass="pre">float</span><spanclass="p"><spanclass="pre">,</span></span><spanclass="w"></span><spanclass="pre">numpy.ndarray</span><spanclass="p"><spanclass="pre">]</span></span></em><aclass="headerlink" href="#qiskit.algorithms.optimizers.OptimizerState.x" title="Permalink to this definition">¶</a></dt><dd><p>Current optimization parameters.</p></dd>
(so Union, Optional etc are correctly cased in the HTML). The causing CSS rule seems to be:
I don't know if it's more appropriate to remove the uppercasing entirely (I don't know what it's supposed to be uppercasing) or to change the selector of the rule so it isn't affecting these type hints.
The text was updated successfully, but these errors were encountered:
The property you mention here is also responsible for capitalising the class title at the top of the page, so probably can't remove it completely, I'll have a look at some of the other css attributes around and see what makes the most sense
There's a CSS rule causing type hints that appear in the documentation of class attributes (such as those created by
@dataclasses.dataclass
) to be all upper-cased. I'm not certain which exact objects this is intending to capitalise, but type-hints should probably be exempt, since they're Python objects that are case-sensitive if people want to look them up / import them.For example, on this page for an algorithms
dataclass
, the attributes are given all in uppercase. The Sphinx-generated HTML for a single attribute is (linebreaks inserted):(so
Union
,Optional
etc are correctly cased in the HTML). The causing CSS rule seems to be:I don't know if it's more appropriate to remove the uppercasing entirely (I don't know what it's supposed to be uppercasing) or to change the selector of the rule so it isn't affecting these type hints.
The text was updated successfully, but these errors were encountered: