Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions shiny/_docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import sys
from pathlib import Path
from typing import TYPE_CHECKING, Any, Callable, Literal, Optional, TypeVar


Expand Down Expand Up @@ -152,17 +153,19 @@ def _(func: F) -> F:
return func

other_files: list[str] = []
for f in os.listdir(example_dir):
abs_f = os.path.join(example_dir, f)
for abs_f in Path(example_dir).glob("**/*"):
rel_f = abs_f.relative_to(example_dir)
f = os.path.basename(abs_f)
is_support_file = (
os.path.isfile(abs_f)
and f != app_file_name
and f != "app.py"
and f != ".DS_Store"
and not f.startswith("app-")
and not f.startswith("__")
and not str(rel_f).startswith("__")
)
if is_support_file:
other_files.append(abs_f)
other_files.append(str(abs_f))

if func.__doc__ is None:
func.__doc__ = ""
Expand Down