diff --git a/shiny/_docstring.py b/shiny/_docstring.py index b37e07b37..f6d41c447 100644 --- a/shiny/_docstring.py +++ b/shiny/_docstring.py @@ -154,9 +154,9 @@ def _(func: F) -> F: other_files: list[str] = [] for abs_f in Path(example_dir).glob("**/*"): - path_parts = Path(abs_f).parts rel_f = abs_f.relative_to(example_dir) - f = os.path.basename(abs_f) + path_parts = Path(rel_f).parts + f = os.path.basename(rel_f) is_support_file = ( os.path.isfile(abs_f) and f != app_file_name @@ -164,7 +164,7 @@ def _(func: F) -> F: and f != ".DS_Store" and "venv" not in path_parts and ".venv" not in path_parts - and not f.startswith("app-") + and not (f.startswith("app-") and f.endswith(".py")) and not str(rel_f).startswith("__") ) if is_support_file: