Skip to content

Commit

Permalink
chore(internal): minor style changes (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 22, 2025
1 parent 6472cde commit eeef003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rizaio/_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ 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)

origin = get_origin(cast_to) or cast_to

if self._is_sse_stream:
if to:
if not is_stream_class_type(to):
Expand Down Expand Up @@ -195,8 +197,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
if cast_to == bool:
return cast(R, response.text.lower() == "true")

origin = get_origin(cast_to) or cast_to

if origin == APIResponse:
raise RuntimeError("Unexpected state - cast_to is `APIResponse`")

Expand Down

0 comments on commit eeef003

Please sign in to comment.