Repository navigation
fix(markdown-claims,#14982): escape \gamma in Family D1 docstring (SyntaxWarning) - #15004
Merged
Merged
Conversation
…ntaxWarning) The docstring mixed \gamma (correct) with a lone \gamma (invalid \g escape, SyntaxWarning on py3.12+). Doubling the backslash on the one unescaped line keeps the rendered LaTeX identical and matches its two siblings.
Contributor
|
✅ No prose/output mismatch detected in the notebooks this PR changed. Scope = notebooks CHANGED in this PR, not the whole corpus. Explicit |
7 tasks
This was referenced Sep 7, 2026
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.
Grain: MED/tooling -- lane myia-po-2026:CoursIA -- prev: DEEP/lean #14998
check_markdown_claims_output : échappement de
\gammadans la docstring Family D1 (SyntaxWarning)Closes #14982
Depuis #14934 (MERGED 01:05Z),
check_markdown_claims_output.pyémet unSyntaxWarning: "\g" is an invalid escape sequenceà l'import sur Python 3.12+. La docstring de_is_math_parameter_definitionéchappait correctement\\mu(ligne 629) et\\gamma(ligne 623), sauf sur UNE ligne :'Avec $\gamma = 0.9$'(backslash simple → séquence\ginvalide). L'incohérence était dans la même docstring.Correctif : doubler le backslash de la ligne fautive (
$\\gamma), symétrique du\\muvoisin. Le rendu LaTeX de la docstring reste identique ; le rawr"""a été écarté car il aurait affiché\\gamma(double) dans un texte qui cite du LaTeX simple.Acceptance (issue, point par point)
python -W error::SyntaxWarning -c "<import>"passe sans leverACCEPTANCE-1 PASS) — et comme 3.14 fait de toute séquence invalide une erreur, l'import propre prouve qu'aucune autre séquence invalide ne subsiste dans le modulepytest scripts/tests/test_check_markdown_claims_output.pyreste à 123/123r"""ne doit pas transformer les exemples LaTeX cités)\gammaest inchangé, cohérent avec\\gamma/\\muvoisinsPérimètre
Perimètre: 1 fichier : scripts/check_markdown_claims_output.py (+1/−1)