Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: r-lib/actions/setup-tinytex@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2
- uses: r-lib/actions/setup-tinytex@a51a8012b0aab7c32ef9d19bf54da93f3254335e # v2
if: runner.os != 'Windows'
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:
always() &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
uses: github/codeql-action/upload-sarif@e46ed2cbd01164d986452f91f178727624ae40d7 # v4
with:
sarif_file: zizmor.sarif
10 changes: 6 additions & 4 deletions src/pytask_latex/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def pytask_collect_modify_tasks(session: Session, tasks: list[PTask]) -> None:
all_products = {
product.path
for task in tasks
for product in tree_leaves(task.produces)
for product in tree_leaves(task.produces) # ty: ignore[invalid-argument-type]
if isinstance(product, PPathNode)
}
latex_tasks = [task for task in tasks if has_mark(task, "latex")]
Expand Down Expand Up @@ -262,7 +262,7 @@ def _add_latex_dependencies_retroactively(
try:
path_to_tex = task.depends_on["_path_to_tex"]
scanned_deps = (
set(lds.scan(path_to_tex.path))
set(lds.scan(path_to_tex.path)) # ty: ignore[invalid-argument-type]
if isinstance(path_to_tex, PPathNode)
else set()
)
Expand All @@ -275,7 +275,9 @@ def _add_latex_dependencies_retroactively(
# Remove duplicated dependencies which have already been added by the user and those
# which do not exist.
task_deps = {
i.path for i in tree_leaves(task.depends_on) if isinstance(i, PPathNode)
i.path
for i in tree_leaves(task.depends_on) # ty: ignore[invalid-argument-type]
if isinstance(i, PPathNode)
}
additional_deps = scanned_deps - task_deps
new_deps = [i for i in additional_deps if i in all_products or i.exists()]
Expand All @@ -296,7 +298,7 @@ def _add_latex_dependencies_retroactively(
task_name=task.name,
),
),
new_deps,
new_deps, # ty: ignore[invalid-argument-type]
)
task.depends_on["_scanned_dependencies"] = collected_dependencies

Expand Down
Loading