Skip to content

Commit efc0e8e

Browse files
committed
Exclude README.md from markdown-code-runner workflow
README.md contains code blocks that import from homeassistant.components.adaptive_lighting, which only exists when running inside Home Assistant core, not in a regular venv.
1 parent 84f3475 commit efc0e8e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/run_markdown_code_runner.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@ def main() -> int:
5757
"""Main entry point."""
5858
repo_root = Path(__file__).parent.parent
5959

60-
# Also check README.md at repo root
60+
# Only process docs/ files - README.md requires homeassistant imports
61+
# that are only available when running inside Home Assistant core
6162
files = find_markdown_files_with_code_blocks(repo_root / "docs")
62-
readme = repo_root / "README.md"
63-
if readme.exists() and "<!-- CODE:START -->" in readme.read_text():
64-
files.append(readme)
6563

6664
success = run_markdown_code_runner(files, repo_root)
6765
return 0 if success else 1

0 commit comments

Comments
 (0)