Repository navigation
Commit 4f81af6
fix: make the OA and conjugation docstrings raw strings (#251)
Two docstrings containing LaTeX are not raw strings, so compiling the
package gives `invalid escape sequence '\m'` SyntaxWarnings (visible on
every import under Python 3.12 until the `.pyc` is cached, and in
Pyodide, which has no cache).
In `UnitQuaternion.OA` it is worse than a warning: `\t` (of `\times`)
and `\v` (of `\vec`) are valid escapes, so the rendered docs contain a
tab and a vertical tab instead of the symbols. That docstring was
rewritten in #195 without the `r` prefix; the `conjugation` one predates
it.
Adds a test that compiles every module and fails on
`SyntaxWarning`/`DeprecationWarning`, so a non-raw docstring with a
backslash fails CI.
Checked by compiling the whole package on 3.12: two warnings before
(`baseposematrix.py:629`, `quaternion.py:1454`), none after; the new
test fails on `master` and passes with the change.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>1 parent 81071a3 commit 4f81af6
3 files changed
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
621 | | - | |
| 621 | + | |
622 | 622 | | |
623 | 623 | | |
624 | 624 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1483 | 1483 | | |
1484 | 1484 | | |
1485 | 1485 | | |
1486 | | - | |
| 1486 | + | |
1487 | 1487 | | |
1488 | 1488 | | |
1489 | 1489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments