Skip to content

docs: fix demo.md snippet includes broken by ruff 0.16 - #78

Merged
bagowix merged 1 commit into
mainfrom
docs/fix-demo-snippets
Jul 24, 2026
Merged

docs: fix demo.md snippet includes broken by ruff 0.16#78
bagowix merged 1 commit into
mainfrom
docs/fix-demo-snippets

Conversation

@bagowix

@bagowix bagowix commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

ruff 0.16 formats Python code blocks embedded in Markdown. It parsed the pymdownx.snippets include directives in demo.md (--8<-- "examples/*.py") as Python expressions and rewrote them to --8 < --'examples/*.py', which neither the docs site nor scripts/build_llms_full.py can resolve — so the demo page and llms-full.txt lost their inlined example sources.

  • Restore the three directives to the canonical --8<-- "..." form.
  • Exclude docs/demo.md from ruff (extend-exclude) so the formatter stops mangling the non-Python include directives; the file has no real Python to format, only these includes.
  • Regenerate docs/llms-full.txt: the examples inline again and the page syncs with the current sources.

ruff 0.16 formats Python code blocks embedded in Markdown. It parsed the
pymdownx.snippets include directives in demo.md (--8<-- "examples/*.py")
as Python expressions and rewrote them to `--8 < --'examples/*.py'`,
which neither the docs site nor scripts/build_llms_full.py can resolve —
so the demo page and llms-full.txt lost their inlined example sources.

- Restore the three directives to the canonical `--8<-- "..."` form.
- Exclude docs/demo.md from ruff (extend-exclude) so the formatter stops
  mangling the non-Python include directives; the file has no real Python
  to format, only these includes.
- Regenerate docs/llms-full.txt: the examples inline again and the page
  syncs with the current sources.
@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@bagowix
bagowix merged commit 47a798b into main Jul 24, 2026
10 of 11 checks passed
@bagowix
bagowix deleted the docs/fix-demo-snippets branch July 24, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant