Skip to content

Commit

Permalink
Fix logic for detection of support files in docs (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
wch authored Jul 29, 2024
1 parent 3b278e3 commit 89bab6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shiny/_docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,17 @@ 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
and f != "app.py"
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:
Expand Down

0 comments on commit 89bab6d

Please sign in to comment.