Skip to content

Commit 2f01d23

Browse files
committed
Fix local UPath joinpath typing
1 parent aa54396 commit 2f01d23

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/_pytask/collect.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,10 @@ def pytask_collect_node( # noqa: C901, PLR0912
465465
and not is_non_local_path(node.path)
466466
and not node.path.is_absolute()
467467
):
468-
node.path = path.joinpath(node.path)
468+
local_node_path = (
469+
Path(str(node.path)) if isinstance(node.path, UPath) else node.path
470+
)
471+
node.path = path.joinpath(local_node_path)
469472

470473
# ``normpath`` removes ``../`` from the path which is necessary for the casing
471474
# check which will fail since ``.resolves()`` also normalizes a path.

0 commit comments

Comments
 (0)