Skip to content

Use r-strings for docstrings containing LaTeX markup#1074

Open
mhucka wants to merge 1 commit into
tensorflow:masterfrom
mhucka:make-docstrings-r-strings
Open

Use r-strings for docstrings containing LaTeX markup#1074
mhucka wants to merge 1 commit into
tensorflow:masterfrom
mhucka:make-docstrings-r-strings

Conversation

@mhucka
Copy link
Copy Markdown
Member

@mhucka mhucka commented May 22, 2026

A few docstrings in Python files contained LaTeX mathematical notation. They should be made into raw strings (using the r prefix) so that Python doesn't misinterpret the backslash characters.

There are no code or content changes in this PR.

@mhucka mhucka added area/docs Involves documentation – problems, ideas, requests area/python Involves Python code labels May 22, 2026
@mhucka mhucka self-assigned this May 22, 2026
@mhucka mhucka marked this pull request as ready for review May 22, 2026 04:55
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates several docstrings in fidelity_op.py, inner_product_op.py, and spin_system.py to use raw string literals (r"""). This change ensures that LaTeX mathematical expressions containing backslashes are interpreted correctly. I have no feedback to provide as there were no review comments.

@mhucka mhucka requested a review from MichaelBroughton May 22, 2026 04:58
@mhucka mhucka changed the title Use r-strings for docstrings containing latex Use r-strings for docstrings containing LaTeX markup May 22, 2026
Copy link
Copy Markdown
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to double check how these render on the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Involves documentation – problems, ideas, requests area/python Involves Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants