Repository navigation
Make the docstrings of the e2v CCD64 depletion models raw - #268
Merged
Merged
Conversation
Their `\Omega` is an invalid escape sequence in a plain string, so Python prints a SyntaxWarning whenever it compiles either module, and a future Python will refuse it. The text of the docstrings is unchanged. Ruff now checks for invalid escapes (W605), which found only these two. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Bbxi6Vw6U8Q4gVCXHfEyN
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 129 129
Lines 10540 10540
=========================================
Hits 10540 10540
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The docstrings of
e2v_ccd64_thickande2v_ccd64_thininoptika.sensors.materials.depletionwrite the unit of resistivity as:math:`\Omega`-cmin a plain string, where\Ois an invalid escape sequence. Python keeps the backslash, so the docs are right, but it prints aSyntaxWarningeach time it compiles either module, as on the firstimport optikaafter an install from source:and a future Python will make it an error. This makes both docstrings raw, as optika's other docstrings with LaTeX in them are, and their text is unchanged. It has been there since #124.
It also adds W605 (invalid escape sequence) to the rules ruff checks, so this can't come back. On main it finds these two and nothing else.
Both functions are cached by
optika.memory, which keys on their source, so the first call after this fits each model again.Checks
ruff(with W605) andblackpass.optika/sensors/materials/depletionpass.🤖 Generated with Claude Code
https://claude.ai/code/session_011Bbxi6Vw6U8Q4gVCXHfEyN