Skip to content

Commit

Permalink
fix(internal): correct support for TypeAliasType
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie committed Dec 13, 2024
1 parent 576ae9b commit 2f6ba9e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/anthropic/_legacy_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
if cast_to and is_annotated_type(cast_to):
cast_to = extract_type_arg(cast_to, 0)

cast_to = to if to is not None else self._cast_to
origin = get_origin(cast_to) or cast_to

if inspect.isclass(origin):
Expand Down
1 change: 0 additions & 1 deletion src/anthropic/_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
if cast_to and is_annotated_type(cast_to):
cast_to = extract_type_arg(cast_to, 0)

cast_to = to if to is not None else self._cast_to
origin = get_origin(cast_to) or cast_to

if inspect.isclass(origin):
Expand Down

0 comments on commit 2f6ba9e

Please sign in to comment.