Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

Write test to detect unescaped double-underscore and single-underscore values in docstrings

Open Strilanc opened this issue 6 years ago • 6 comments

These are almost always intended to refer to magic methods, but markdown/rst/etc interpret it as emphasis and remove the underscores. We should detect that this is happening and raise errors.

Strilanc avatar Nov 22 '18 02:11 Strilanc

An example can be found in https://cirq.readthedocs.io/en/stable/generated/cirq.phase_by.html where we see an un-escaped _phased_by_

dabacon avatar May 01 '20 21:05 dabacon

As we're retiring sphinx, the work here is to check this behavior in devsite.

balopat avatar Sep 22 '20 14:09 balopat

Still relevant, as there are places with docstrings that have unescaped _dunder_ methods that render strangely.

dabacon avatar Jul 07 '22 19:07 dabacon

Ill take the issue

angelo-laskaris avatar Feb 28 '24 18:02 angelo-laskaris