Cirq
Cirq copied to clipboard
Write test to detect unescaped double-underscore and single-underscore values in docstrings
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.
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_
As we're retiring sphinx, the work here is to check this behavior in devsite.
Still relevant, as there are places with docstrings that have unescaped _dunder_ methods that render strangely.
Ill take the issue