Skip to content

Commit

Permalink
tweak implementation for #156
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Jul 17, 2024
1 parent 507ccb4 commit 80b0b0b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions render_static/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,19 +720,15 @@ def resolve_renderings(
raise TemplateDoesNotExist(selector, chain=chain)

for _, template in templates.items():
tmpl_abs_path = Path(template.origin.name).absolute()
if any(
(
Path(template.origin.name).absolute().is_relative_to(excl)
excl == tmpl_abs_path or excl in tmpl_abs_path.parents
for excl in excluded_dirs
)
):
continue
if any(
(
Path(template.origin.name).absolute() == excl
for excl in excluded_files
)
):
if any((tmpl_abs_path == excl for excl in excluded_files)):
continue
yield Render(
selector=selector,
Expand Down

0 comments on commit 80b0b0b

Please sign in to comment.