MCPcopy Index your code
hub / github.com/reactive-python/reactpy / get_main_example_file_by_name

Function get_main_example_file_by_name

docs/docs_app/examples.py:46–53  ·  view source on GitHub ↗
(
    name: str, relative_to: str | Path | None = SOURCE_DIR
)

Source from the content-addressed store, hash-verified

44
45
46def 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
56def get_example_files_by_name(

Callers 1

_load_one_exampleFunction · 0.85

Calls 1

Tested by

no test coverage detected