Skip to content

Commit 89bab6d

Browse files
authored
Fix logic for detection of support files in docs (#1580)
1 parent 3b278e3 commit 89bab6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shiny/_docstring.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,17 @@ def _(func: F) -> F:
154154

155155
other_files: list[str] = []
156156
for abs_f in Path(example_dir).glob("**/*"):
157-
path_parts = Path(abs_f).parts
158157
rel_f = abs_f.relative_to(example_dir)
159-
f = os.path.basename(abs_f)
158+
path_parts = Path(rel_f).parts
159+
f = os.path.basename(rel_f)
160160
is_support_file = (
161161
os.path.isfile(abs_f)
162162
and f != app_file_name
163163
and f != "app.py"
164164
and f != ".DS_Store"
165165
and "venv" not in path_parts
166166
and ".venv" not in path_parts
167-
and not f.startswith("app-")
167+
and not (f.startswith("app-") and f.endswith(".py"))
168168
and not str(rel_f).startswith("__")
169169
)
170170
if is_support_file:

0 commit comments

Comments
 (0)