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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Types of changes

# Latch SDK Changelog

## 2.76.5 - 2026-06-22

* Fix LatchFilePathTransformer for Annotated types

## 2.76.3 - 2026-06-19

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include = ["src/**/*.py", "src/**/*.graphql", "src/**/py.typed", "src/latch_cli/

[project]
name = "latch"
version = "2.76.4"
version = "2.76.5"
description = "The Latch SDK"
authors = [{ name = "Kenny Workman", email = "kenny@latch.bio" }]
maintainers = [{ name = "Kenny Workman", email = "kenny@latch.bio" }]
Expand Down
5 changes: 4 additions & 1 deletion src/latch/types/file.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from os import PathLike
from pathlib import Path
from typing import Annotated, Optional, Union
from typing import Annotated, Optional, Union, get_args, get_origin
from urllib.parse import urlparse

import gql
Expand Down Expand Up @@ -249,6 +249,9 @@ def to_python_value(
"Casting from Pathlike to LatchFile is currently not supported."
)

while get_origin(expected_python_type) == Annotated:
expected_python_type = get_args(expected_python_type)[0]

if not issubclass(expected_python_type, LatchFile):
raise TypeError(
f"Neither os.PathLike nor LatchFile specified {expected_python_type}"
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading