Generate appropriate error message for missing example. Args: project_root: FastLED project root directory example: Example name or path that was not found Returns: Error message describing where the example was expected
(project_root: Path, example: str)
| 88 | |
| 89 | |
| 90 | def get_example_error_message(project_root: Path, example: str) -> str: |
| 91 | """Generate appropriate error message for missing example. |
| 92 | |
| 93 | Args: |
| 94 | project_root: FastLED project root directory |
| 95 | example: Example name or path that was not found |
| 96 | |
| 97 | Returns: |
| 98 | Error message describing where the example was expected |
| 99 | """ |
| 100 | example_path = Path(example) |
| 101 | |
| 102 | if example_path.is_absolute(): |
| 103 | return f"Example directory not found: {example}" |
| 104 | else: |
| 105 | return f"Example not found: {project_root / 'examples' / example}" |
| 106 | |
| 107 | |
| 108 | # ============================================================================ |
no outgoing calls
no test coverage detected