Skip to content

fix(markdown-claims,#14982): escape \gamma in Family D1 docstring (SyntaxWarning) - #15004

Merged
myia-ai-01 merged 1 commit into
mainfrom
feature/14982-markdown-syntaxwarning
Sep 7, 2026
Merged

myia-ai-01 merged 1 commit into
mainfrom
feature/14982-markdown-syntaxwarning

Conversation

@jsboige

@jsboige jsboige commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Grain: MED/tooling -- lane myia-po-2026:CoursIA -- prev: DEEP/lean #14998

check_markdown_claims_output : échappement de \gamma dans la docstring Family D1 (SyntaxWarning)

Closes #14982

Depuis #14934 (MERGED 01:05Z), check_markdown_claims_output.py émet un SyntaxWarning: "\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 \g invalide). L'incohérence était dans la même docstring.

Correctif : doubler le backslash de la ligne fautive ($\\gamma), symétrique du \\mu voisin. Le rendu LaTeX de la docstring reste identique ; le raw r""" a été écarté car il aurait affiché \\gamma (double) dans un texte qui cite du LaTeX simple.

Acceptance (issue, point par point)

# Critère Preuve
1 python -W error::SyntaxWarning -c "<import>" passe sans lever ✅ PASS sur py 3.14.4 (plus strict que 3.12 ; import propre ACCEPTANCE-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 module
2 pytest scripts/tests/test_check_markdown_claims_output.py reste à 123/123 ✅ 123 passed (collected 123)
3 La docstring reste lisible (le r""" ne doit pas transformer les exemples LaTeX cités) ✅ échappement symétrique choisi — le rendu \gamma est inchangé, cohérent avec \\gamma/\\mu voisins

Périmètre

Perimètre: 1 fichier : scripts/check_markdown_claims_output.py (+1/−1)

…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.
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ No prose/output mismatch detected in the notebooks this PR changed.

Scope = notebooks CHANGED in this PR, not the whole corpus. Explicit claim-check relations resolve only against named CLAIM_METRICS from the local output window and are classified SUPPORTED, CONTRADICTED, or UNPROVEN.
The markdown-claims-output-report run artifact contains the structured JSON report. See python scripts/check_markdown_claims_output.py --help for re-running locally.
Detector rationale: c.290 / c.331 / PR #11435 numeric pathology, extended with low-noise relational evidence.

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

Labels

lane-claim-absent Closing issue carries no claim at all (#10223)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check_markdown_claims_output.py : SyntaxWarning "\g" introduit par #14934 (docstring non-raw, ligne 631)

2 participants