(
name: str, relative_to: str | Path | None = SOURCE_DIR
)
| 44 | |
| 45 | |
| 46 | def get_main_example_file_by_name( |
| 47 | name: str, relative_to: str | Path | None = SOURCE_DIR |
| 48 | ) -> Path: |
| 49 | path = _get_root_example_path_by_name(name, relative_to) |
| 50 | if path.is_dir(): |
| 51 | return path / "main.py" |
| 52 | else: |
| 53 | return path.with_suffix(".py") |
| 54 | |
| 55 | |
| 56 | def get_example_files_by_name( |
no test coverage detected