From 5a880c46b7d03fb5b607e7383d2e6a64e8a3046a Mon Sep 17 00:00:00 2001 From: Winston Chang Date: Mon, 29 Jul 2024 10:39:22 -0500 Subject: [PATCH] Fix logic for detection of support files in docs --- shiny/_docstring.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: