Skip to content

Conversation

pavoljuhas
Copy link
Collaborator

@pavoljuhas pavoljuhas commented Sep 25, 2025

  • ruff - activate D301 - escape-sequence-in-docstring

  • Fix escape sequences in docstrings, e.g., switch to raw
    docstrings when we need literal backslash.

Partially implements #7505

@pavoljuhas pavoljuhas requested review from vtomole and a team as code owners September 25, 2025 07:45
@github-actions github-actions bot added the size: S 10< lines changed <50 label Sep 25, 2025
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.36%. Comparing base (63cfe53) to head (5fe739a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7670      +/-   ##
==========================================
- Coverage   99.37%   99.36%   -0.01%     
==========================================
  Files        1082     1082              
  Lines       96691    96691              
==========================================
- Hits        96086    96081       -5     
- Misses        605      610       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pavoljuhas
Copy link
Collaborator Author

This fixes funky effects of escape sequences in docstrings, for example, \r in
pydoc cirq.plot_density_matrix | cat:

# BEFORE

    2. The blue rectangles on the diagonal elements represent the probability
angle$.measuring the system in state $|i
    Rendering scheme is inspired from https://algassert.com/quirk

# AFTER

    2. The blue rectangles on the diagonal elements represent the probability
    of measuring the system in state $|i\rangle$.
    Rendering scheme is inspired from https://algassert.com/quirk

@pavoljuhas pavoljuhas requested a review from mhucka September 25, 2025 18:21
Copy link
Contributor

@mhucka mhucka left a comment

Choose a reason for hiding this comment

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

Great!

@pavoljuhas pavoljuhas added this pull request to the merge queue Sep 25, 2025
@pavoljuhas pavoljuhas removed this pull request from the merge queue due to a manual request Sep 25, 2025
@pavoljuhas pavoljuhas added this pull request to the merge queue Sep 25, 2025
Merged via the queue into quantumlib:main with commit 7a0a7be Sep 25, 2025
35 checks passed
@pavoljuhas pavoljuhas deleted the ruff-activate-d301 branch September 25, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants